Re: SQLRPGLE and /Include
> 1) I created a SQLRPGLE program
> 2) In this program, there is a reference to a /Include
> 3) In this /Include, there are variables defined
> 4) In the program, there are definitions in the D-Spec referring to
> the variables defined in the /Include
> To compile this program, I have to change the RPGPPOPT parameter of
> the CRTSQLRPGI command to (*LVL2).
> Apart from changing the CRTSQLRPGI command with the CHGDFTCMD to
> default the RPGPPOPT to *LVL2, is there a way to make sure *LVL2 will
> always be used by the SQL pre-processor? (My client is not a big fan
> of CHGCMDDFT, so I try to find a safe way around)
> I tried to include RPGPPOPT(*LVL2) in the program's H-Spec, but it's
> not accepted. I didn't find anything in the documentation, but I know
> the documentation is not up to date.
A suggestion from a precompiler expert (ie, not me) :
It sounds like there is information in the /Include file that the
precompiler needs to know about. /Include was introduced because the
precompiler had limitations (ex. can't do nested /COPY). /Include is
the same as /Copy except the precompiler will ignore the statement.
This allowed customers to "hide" information from the precompiler and to
do nested copies. Change the /Include to a /Copy then the precompiler
will open the file.