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

Is it possible to pass variables of stem to a skeleton JCL?


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Csongor

New User


Joined: 23 Apr 2015
Posts: 16
Location: Hungary

PostPosted: Fri Jun 10, 2016 7:33 pm
Reply with quote

Hello!

If I have a stem in REXX, and I want to generate the exact number of steps in the skeleton JCL like the number of variables in the stem, and fill each step with the variables of the stem, each step with different values obviously.
For example I have list gdg -bases and I want to have a job with IDCAMS generated for all the bases to create them. (this is just an example, please do not focus on this particularly)

Can you please help me with suggestions?
(If this question is not at the right place in the rexx section, sorry about it)
Back to top
View user's profile Send private message
enrico-sorichetti

Senior Moderator


Joined: 14 Mar 2007
Posts: 10730
Location: italy

PostPosted: Fri Jun 10, 2016 7:54 pm
Reply with quote

not directly...

search the forum using FTINCL and selecting my posts,
lots of tested examples

thelogic ( just disregard the syntax )

do i 1 to stem.0
using the stem.i value
fill all the variables used in the repetitive skel
ftinclude the repetitive skel
end

see here for an approach
ibmmainframes.com/viewtopic.php?t=55549&highlight=ftincl

and here for a logic exercise
ibmmainframes.com/viewtopic.php?t=60392&highlight=ftincl
Back to top
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 419
Location: Denmark

PostPosted: Sat Jun 11, 2016 8:52 pm
Reply with quote

2 alternate methods:
1: Create a table in your REXX, the skeleton can then do a )DOT / )ENDDOT over the table. Remember to delete the table afterwards.

2: QUEUE the stem, then the skeleton can then do something like this:
Code:

)REXX QN
  qn=queued()
)ENDREXX
)DO N = 1 TO &QN
)REXX DATA
 pull data
)ENDREXX
  your part comes here
)ENDDO

but sadly no direct way to address the stem in a skeleton.
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 How to pass arguments in a ISPSTART c... CLIST & REXX 6
No new posts Compare two character variables Head ... CLIST & REXX 3
No new posts Determine what library member is in, ... JCL & VSAM 9
No new posts ISPF skeleton that has IF/THEN/DO sta... TSO/ISPF 15
No new posts Not able to view the values of variab... CA Products 1
Search our Forums:

Back to Top