1

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 Answers1

3

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

RockBoro
  • 2,163
  • 2
  • 18
  • 34
  • 1
    Should be noted that `SET OPTION` is actually a compile time statement and must be physically the first SQL statement in the source file. – Charles Dec 29 '20 at 15:44