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.
I'm trying to put together a simple "Run when installing a new system" script in CL. I've come up with the following:
CHGSYSVAL SYSVAL(QCTLSBSD) VALUE('QCTL') CHGSYSVAL SYSVAL(QRMTSIGN) VALUE(*VERIFY) CHGSYSVAL SYSVAL(QASTLVL) VALUE(*INTERMED) CHGCMDDFT CMD(CRTBNDRPG) NEWDFT('dbgview(*SOURCE)') CHGCMDDFT CMD(CRTRPGMOD) NEWDFT('dbgview(*SOURCE)') CHGCMDDFT CMD(CRTBNDCL) NEWDFT('dbgview(*SOURCE)') CHGCMDDFT CMD(CRTCLMOD) NEWDFT('dbgview(*SOURCE)')
What else?
Things related to subsystem customizations (CHGSBSD, ADD/CHGJOBQE, ...).
May need CHGSHRPOOL (other than those controlled by CHGSYSVAL). If you use *SHRPOOLx, you may need CHGSBSD and CHGRTGE.
On some servers we force compiles to batch with CHGCMD CRTBNDRPG ALLOW(*BATCH *BPGM *BMOD *BREXX *EXEC). We do this for OPM and ILE RPG, COBOL, and the various CRTSQL*, but it's not necessary for CL.
Hmm... Do you also need CHGCMDDFT dbgview(*SOURCE) for CRTSQL*?
btw, We store the customizations in QGPL/QCLSRC(#SYSMODS) as a CL (not CLP). '#' sorts before 'A', so it's at the top of the list. You have the option to compile and CALL, or SBMDBJOB.
>>Hmm... Do you also need CHGCMDDFT dbgview(*SOURCE) for CRTSQL*?
No. SQL doesn't support DBGVIEW(*SOURCE) for some reason. It wouldn't make sense since it generates the source in QTEMP and then doesn't re-direct it to the original source.
I usually add a:
EXEC SQL SET OPTIONS = COMPILEOPT = 'DBGVIEW(*LIST)';
to my SQLRPGLE source members.
OPM SQL doesn't, but ILE does. Database Embedded SQL programming says if DBGVIEW(*SOURCE) is specified on the CRTSQLxxx command, then DBGVIEW(*ALL) is specified on both CRTxxxMOD and CRTBNDxxx commands.