Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

REXX to pass all pds member to a job sequentially

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
sukanya-ramanathan

New User


Joined: 07 Apr 2007
Posts: 8
Location: Hyderabad

PostPosted: Wed Jun 25, 2008 2:37 pm    Post subject: REXX to pass all pds member to a job sequentially
Reply with quote

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
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed Jun 25, 2008 2:42 pm    Post subject: Re: REXX to pass all pds member to a job sequentially
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Jun 25, 2008 2:57 pm    Post subject:
Reply with quote

What process do you want to execute for each PDS member ?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Wed Jun 25, 2008 3:01 pm    Post subject: Reply to: REXX to pass all pds member to a job sequentially
Reply with quote

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
View user's profile Send private message
sukanya-ramanathan

New User


Joined: 07 Apr 2007
Posts: 8
Location: Hyderabad

PostPosted: Wed Jun 25, 2008 3:05 pm    Post subject:
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Wed Jun 25, 2008 3:10 pm    Post subject: Reply to: REXX to pass all pds member to a job sequentially
Reply with quote

You still did not answer my question!

a small example would help also ( 2 member names )
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 988
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Wed Jun 25, 2008 3:11 pm    Post subject:
Reply with quote

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
View user's profile Send private message
HappySrinu

Active User


Joined: 22 Jan 2008
Posts: 195
Location: India

PostPosted: Wed Jun 25, 2008 3:13 pm    Post subject: Reply to: REXX to pass all pds member to a job sequentially
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Jun 25, 2008 4:40 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 988
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Wed Jun 25, 2008 4:53 pm    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Jun 25, 2008 5:00 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Jun 25, 2008 5:32 pm    Post subject:
Reply with quote

I apologize if I have insulted any of the sight-challenged.
Back to top
View user's profile Send private message
kabyab

New User


Joined: 31 Aug 2005
Posts: 34
Location: Pune, India

PostPosted: Fri Aug 22, 2008 1:02 pm    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Aug 22, 2008 1:11 pm    Post subject:
Reply with quote

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
View user's profile Send private message
kabyab

New User


Joined: 31 Aug 2005
Posts: 34
Location: Pune, India

PostPosted: Fri Aug 22, 2008 3:20 pm    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Aug 22, 2008 4:14 pm    Post subject:
Reply with quote

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
View user's profile Send private message
kabyab

New User


Joined: 31 Aug 2005
Posts: 34
Location: Pune, India

PostPosted: Fri Aug 22, 2008 7:04 pm    Post subject: Reply to: REXX to pass all pds member to a job sequentially
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us