View previous topic :: View next topic
|
Author |
Message |
sukanya-ramanathan
New User
Joined: 07 Apr 2007 Posts: 8 Location: Hyderabad
|
|
|
|
Hi All,
Here is one requirement where we have to pass a member name to JCL. The JCL should accept the member as input dynamically and execute. As such we need to pass 100s of members one by one and the JCL has to execute each time.
Please let me know how this can be achieved.
Regds |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
sukanya-ramanathan wrote: |
Here is one requirement where we have to pass a member name to JCL. |
Where is this member name coming from?
sukanya-ramanathan wrote: |
The JCL should accept the member as input dynamically and execute. |
So, you just need to create some JCL and submit it. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
What process do you want to execute for each PDS member ? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
options...
one job for each member
one step for each member
one step with all members stacked up somewhere
just the member name or the member content ?
please enlighten ! |
|
Back to top |
|
|
sukanya-ramanathan
New User
Joined: 07 Apr 2007 Posts: 8 Location: Hyderabad
|
|
|
|
sorry for the confusion.
JCL is already present. I need a rexx, which reads a PS file which contains all the member names and pass each member as and when it is read to the jcl as input and run the jcl |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
You still did not answer my question!
a small example would help also ( 2 member names ) |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
If I understand your requirements, use LISTDSI (or, alternatively, LMMLIST). The LISTDS version...
Code: |
m = outtrap("mem.") /* setup stem var for LISTDS info */
Address TSO "LISTDS '"pds"' members"
m = outtrap("OFF") /* set OUTTRAP 'OFF' */
do i = 1 to mem.0 while(mem.h ¬= "--MEMBERS--")
NOP /* skip down to member list returned */
end
i = i + 1 /* bypass header line */
do j = i to mem.0
parse var mem.j this_mem rest
/* add code to build and submit your job */
/* e.g. "//JOBCARD JOB ..... " */
/* e.g. "// EXEC YOURPROC,MEMBER="this_mem */
end
|
Regards,
Garry. |
|
Back to top |
|
|
HappySrinu
Active User
Joined: 22 Jan 2008 Posts: 194 Location: India
|
|
|
|
Do you want to run the group of members(jcl's). Is it so?
Is it some thing like you want to submit group of jcl's in one shot right? is my understanding is correct?
if so you can use TSO SUBMIT command and give all members and just by executing rexx , it will submit all members in same/differen pds |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
man, again, no one bothers to read.
the OP has a file with member names.
He wants a rexx that would modify an existing JCL by placing the member name in the appropriate place in the jcl and then submit the jcl then place the next member name in the jcl and submit that, .... until his trigger file (list of members) is empty. |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
Dick,
The info that the file with names was PS hadn't arrived before I submitted my suggestion and I suspect the same is true for others. It would be fairly simple, in any case, to modify the code snippet to process from EXECIO * DISKR for the PS file.
Garry. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
I was just asking what the OP wanted to achieve to ascertain the best way of helping.
Possibly submit one JCL for everything, or if one per member really is required. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
I apologize if I have insulted any of the sight-challenged. |
|
Back to top |
|
|
kabyab
New User
Joined: 31 Aug 2005 Posts: 34 Location: Pune, India
|
|
|
|
Any answer to this query?
I am trying to follow it as my requirement is quite similar to this. I have a JCL and I need to pass CYCLNO as parameter into the JCL. something like a Symbolic Parameter in JCLs. But this parameter would be taken as I/P through the REXX and the CYCLNO incremented after the JCL has been successfully submitted and RC=0 or 4 and then the same JCL submitted again with the incremented CYCLNO.
The CYCLNO symbolic variable may be present at any location in the JCL and it needs to be replaced with the correct values of CYCLNO each time the JCL is submitted.
Thanks. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
and the CYCLNO incremented after the JCL has been successfully submitted and RC=0 or 4
What ? You want to wait for the result of the submitted job before incrementing the CYCLNO ?
If so - This type of request has been discussed many times before and everytime was rejected as a bad idea. |
|
Back to top |
|
|
kabyab
New User
Joined: 31 Aug 2005 Posts: 34 Location: Pune, India
|
|
|
|
If that is a bad idea and it has been rejected so many times then I suppose I should not think in that direction. :-) Thanks for pointing that out. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
What you want to do would be easy enough to generate numerous jobs and increment the CYCLNO for each job and then deal with any failures as and when they occur.
I guess it all depends on how many jobs that you want to submit in any one hit. |
|
Back to top |
|
|
kabyab
New User
Joined: 31 Aug 2005 Posts: 34 Location: Pune, India
|
|
|
|
Thanks Expat for the suggestion.
Actually I have changed my processing logic to handle in a different manner. In case any help is required I will write back.
Thanks |
|
Back to top |
|
|
|