Midrange News for the IBM i Community

Posted by: George Fuste
IBM i developer
Jacksonville, FL
Compiler option or EXEC SQL SET
has no ratings.
Published: 10 Feb 2016
Revised: 16 Feb 2016 - 3019 days ago
Last viewed on: 21 May 2024 (4382 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

Compiler option or EXEC SQL SET Published by: George Fuste on 10 Feb 2016 view comments(1)

When you have an EXEC SQL set option CLOSQLCSR=*ENDACTGRP in your SQL program it's understood to be a "compile time" option if I'm correct.

But if you compile the member with CRTSQLRPGI and specify command parm CLOSQLCSR(*ENDMOD) the compile then overrides the set option in the program that specified *ENDACTGRP, yes?   This is what I am seeing.  Am I seeing this right?



Return to midrangenews.com home page.
Sort Ascend | Descend


(Sign in to Post a Comment)
Posted by: Ringer
Premium member *
Comment on: Compiler option or EXEC SQL SET
Posted: 8 years 3 months 6 days 13 hours 58 minutes ago

The option in the source code overrides the same option on the compile command. If you think about it, when you compile with CRTSQLRPGI, you are really using ALL the parms on the compile command, even if they are default values. If those CRTSQLRPGI options had precedence, then what would be the point of using setting them in the source code?

Chris Ringer