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

Generate a JCL using REXX


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

New User


Joined: 29 Nov 2007
Posts: 20
Location: india

PostPosted: Sat Feb 06, 2016 6:45 am
Reply with quote

I am completely new to REXX and am trying to read up about it. I am trying to write a REXX to generate a JCL as a member of a PDS. I would also like to parse some parameters from the JCL that would run the REXX. Could someone please provide a sample REXX program that might do something similar to this?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sat Feb 06, 2016 1:12 pm
Reply with quote

search my post using the FTINCL token
You will find quite a few snippets and some full scripts

( all tested and working )
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Sat Feb 06, 2016 9:23 pm
Reply with quote

Spoorni,
for starters, in which environment do you expect that REXX to run? TSO batch or ISPF?

Willy
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Sat Feb 06, 2016 10:07 pm
Reply with quote

This is one way of building a pds member:

address TSO
"delstack"
cc=BpxWdyn('alloc da(dataset(member)) shr rtddn(xdd)')
queue "data-record-1"
queue "data-record-2"
address tso "execio" queued() "diskw" xdd "(finis)"
cc=BpxWdyn('free dd('xdd')')
"delstack"

Of course you should test the success of the various commands.

and one way of parsing parameters:

parse value ' 'translate(arg(1)) with p1 ' PARM1('parm1')' p2
parse value p1 p2 with p1 ' PARM2('parm2')' p2
if p1 p2<>'' than say 'Invalid parm:' space(p1 p2)
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