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've been using my own SAVLIBL/RSTLIBL commands to save the library list (including *CURLIB) at the top of legacy CL programs that muck with the library list and current lib, and then restoring it upon completion.
MYLEGACY: PGM /* dcl stmts */ MONMSG CPF0000 SAVLIBL ... /* Do legacy CL crap here */ RSTLIBL ENDPGM: ENDPGM
This is pretty simple and safe.
What I'm wondering is what other "environment" (i.e., job settings) should I consider? I ask because I'm going to create a SAVENV/RSTENV command that has options for library list, current library, date, current directory, logCLPgm, etc.
Are there any specific job attributes that should be included and if you are doing something like this, what are you saving/restoring? Thanks!
I've done CURLIB and current directory, both of which you mentioned. How about OUTQ (and lib) or PRTDEV? Maybe message logging, LOGLVL, LOGSEV, LOGTYPE -> LOG().