IBM I : CRTSQLRPGI with option (*SQL)

Viewed 146

I have lots of SQLRPGLE programs that I have to compile with OPTION(*SQL). 99% of the time I forget to set that value at compilation time, so I tried to add this parameter value inside H SPECS. Unfortunately it doesn't seem to be any option to set that value in order to properly compile the source code without setting it manually every time. Any help is really appreciated , Giovanni

1 Answers

run the statement exec sql set option naming = *sql at the start of the program. That will set the naming convention of the program.

 /free                                   
      exec sql SET OPTION naming = *sql ;

      exec sql                           
      declare c1 cursor for              
      select      srcseq, srcdta         
      from        qgpl.qrpglesrc ;       

a good article on using SQL options

Related