Sometimes the defaults on the system prevent browsing source on SQL RPG programs in debug. To prevent this we can add following SQL code to the beginning of your RPG program
EXEC SQL SET OPTION NAMING = *SQL, CLOSQLCSR = *ENDMOD, COMMIT = *NONE, DATFMT = *ISO, COMPILEOPT = 'DBGVIEW(*LIST)';
or add ‘DBGVIEW(*LIST)’ to compiler options COMPILEOPT on command CRTSQLRPGI.
Leave a Reply