× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Good to hear. I always used the green screen interface too but I'm trying
to use iNav more whenever possible in my new job..

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Steinmetz, Paul
Sent: Saturday, April 26, 2014 7:31 PM
To: 'Midrange Systems Technical Discussion'
Subject: RE: Using variables instead of constants in AJS

Roger,

I got this working. Was able to do it via green screen.

1) Created/Added two parameters to AJS .
SAVDAT 6 *NONE 042314
SAVLVL 8 *NONE *SAVDATE

2) Then changed the AJS command to use the parameter as the variable.
Save level . . . . . . . . . . . > &SAVLVL
Save level time reference:
Save date . . . . . . . . . . > &SAVDAT

Paul


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Roger Harman
Sent: Thursday, April 24, 2014 11:20 PM
To: 'Midrange Systems Technical Discussion'
Subject: RE: Using variables instead of constants in AJS

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

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Steinmetz, Paul
Sent: Thursday, April 24, 2014 6:56 PM
To: 'midrange-l@xxxxxxxxxxxx'
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
date.
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?

Thank You
_____
Paul Steinmetz
IBM i Systems Administrator

Pencor Services, Inc.
462 Delaware Ave
Palmerton Pa 18071

610-826-9117 work
610-826-9188 fax
610-349-0913 cell
610-377-6012 home

psteinmetz@xxxxxxxxxx
http://www.pencor.com/

--
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,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l.


--
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,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l.

--
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,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.