Midrange News for the IBM i Community

Posted by: Bob Cozzi
Rogue Programmer
Cozzi Productions, Inc.
Job-level Save/Restore Environment Question
has no ratings.
Published: 11 Apr 2014
Revised: 11 Apr 2014 - 3658 days ago
Last viewed on: 15 Apr 2024 (5638 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.

Job-level Save/Restore Environment Question Published by: Bob Cozzi on 11 Apr 2014 view comments(1)

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.

           /* dcl stmts  */
          MONMSG CPF0000
        ...  /* Do legacy CL crap here  */

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!

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


(Sign in to Post a Comment)
Posted by: DaleB
Premium member *
Reading, PA
Comment on: Job-level Save/Restore Environment Question
Posted: 10 years 5 days 12 hours 50 minutes ago

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