Midrange News for the IBM i Community


Posted by: Bob Cozzi
Rogue Programmer
Cozzi Productions, Inc.
Chicagoland
New System Initialization Script/CLP
has no ratings.
Published: 21 Oct 2011
Revised: 23 Jan 2013 - 4111 days ago
Last viewed on: 25 Apr 2024 (6587 views) 

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.

New System Initialization Script/CLP Published by: Bob Cozzi on 21 Oct 2011 view comments(3)

SYSINIT - CL Script to Setup User Environment Defaults

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?

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS

(Sign in to Post a Comment)
Posted by: DaleB
Premium member *
Reading, PA
Comment on: New System Initialization Script/CLP
Posted: 12 years 6 months 6 days 20 hours 55 minutes ago
Edited: Fri, 21 Oct, 2011 at 11:19:55 (4571 days ago)

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.

Posted by: bobcozzi
Site Admin ****
Chicagoland
Comment on: New System Initialization Script/CLP
Posted: 12 years 6 months 6 days 17 hours 48 minutes ago

>>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.

Posted by: DaleB
Premium member *
Reading, PA
Comment on: New System Initialization Script/CLP
Posted: 12 years 6 months 4 days 19 minutes ago

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.