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
 

 

Generate a JCL using REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Generate a JCL using REXX
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Sat Feb 06, 2016 1:12 pm    Post subject: Reply to: Generate a JCL using REXX
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

New User


Joined: 01 Sep 2015
Posts: 96
Location: Switzerland

PostPosted: Sat Feb 06, 2016 9:23 pm    Post subject:
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

New User


Joined: 01 Sep 2015
Posts: 96
Location: Switzerland

PostPosted: Sat Feb 06, 2016 10:07 pm    Post subject:
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    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. 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
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm


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