IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

REXX to pass all pds member to a job sequentially


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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

Global Moderator


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

PostPosted: Wed Jun 25, 2008 2:42 pm
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: 8797
Location: Welsh Wales

PostPosted: Wed Jun 25, 2008 2:57 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Jun 25, 2008 3:01 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Jun 25, 2008 3:10 pm
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

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Wed Jun 25, 2008 3:11 pm
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: 194
Location: India

PostPosted: Wed Jun 25, 2008 3:13 pm
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
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

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Wed Jun 25, 2008 4:53 pm
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: 8797
Location: Welsh Wales

PostPosted: Wed Jun 25, 2008 5:00 pm
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
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
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: 8797
Location: Welsh Wales

PostPosted: Fri Aug 22, 2008 1:11 pm
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
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: 8797
Location: Welsh Wales

PostPosted: Fri Aug 22, 2008 4:14 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top