I haven't used AJS for a couple of years but I recall using variables quite
a bit. Mostly for date calculations in my case.
From the manual......
To add a new command variable, follow these steps:
1. Open Work Management from your iSeries Navigator window.
2. Right-click Advanced Job Scheduler and click Properties.
3. Click the Command Variables tab.
4. Click New and type a name for the command variable.
5. Type a description for the command variable.
6. Type the length of the command variable. The length can range from 1 to
90. 7. Choose how you want to supply the replacement value:
a. Specify the data to use for the command variable. You use any
character in this field. The number of characters in the data cannot be
greater than the length specified in the Length field.
b.Type a formula to calculate the date. (For examples, see the online
c. Type the program name that you use to retrieve the replacement value.
d. Type the library that you use to retrieve the replacement value.
e. Choose whether you want the replacement value retrieved from the
system operator at run time.
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Steinmetz, Paul
Sent: Thursday, April 24, 2014 6:56 PM
Subject: Using variables instead of constants in AJS
I have several scheduled jobs that perform 20 RSTLIBBRM with Save level . .
. . . . . . . . . > *CURRENT
90 RSTLIBBRM SAVLIB(BRCPGMS1) DEV(TAPMLB01) SAVLVL(*CURRENT)
100 RSTLIBBRM SAVLIB(BRCPGMS) DEV(TAPMLB01) SAVLVL(*CURRENT)
110 RSTLIBBRM SAVLIB(BRCPGMSN) DEV(TAPMLB01) SAVLVL(*CURRENT)
95% of the time, Save level *Current is ok.
There are times when Save level needs to be changed to SAVDATE followed by a
Cumbersome to change every sequence.
I would like to change the RSTLIBBRM, make save level a variable, load it
once in the beginning of the job.
Is this possible within AJS?
I know it is possible if I put all the RSTLIBBRM in a CL.
Not the preferred solution.
If the job ever fails, the convenience of being able to restart the job a
specified sequence is a requirement.
If not is there another solution?
IBM i Systems Administrator
Pencor Services, Inc.
462 Delaware Ave
Palmerton Pa 18071
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l