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 Macro to wrap JCL around an ISPF edit session

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Wed Apr 15, 2009 9:32 pm    Post subject: REXX Macro to wrap JCL around an ISPF edit session
Reply with quote

Does anyone have any REXX macro code that could be executed while in a PDS member (ISPF edit session) that will wrap JCL around the contents?

I would like a quick and easy way of creating a batch job that will input the control cards stored in a PDS member.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Wed Apr 15, 2009 9:41 pm    Post subject: Reply to: REXX Macro to wrap JCL around an ISPF edit session
Reply with quote

here is a snippet for the wrapping, Youl will have to carry on a bit of homework to have a running macro icon_biggrin.gif

Code:
head.1 = "card 1"
head.2 = "card 2"
....
head.n = "card n"

do i = n to 1 by - 1
   temp = head.i
   Address ISREDIT LINE BEFORE .ZFIRST = TEMP
end

tail.1 = "card 1"
tail.2 = "card 2"
...
tail.m = "card m"

do i = 1 to m
   temp = tail.i
   Address ISREDIT LINE AFTER .ZLAST = TEMP
end


the header lines are inserted backward to avoid computing the new line number
after each forward insert
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed Apr 15, 2009 9:44 pm    Post subject:
Reply with quote

you could code the 'wrapping' jcl in your rexx.

I have always found it easier to maintain the 'first' half and the 'second' half in a dataset.
execio the first half in,
ispedit LINE the control cards into either the same stem or the stack
execio the second half in
then submit the stem or stack.

i have my own 'symbolics' in the first half,
so that I can make the necessary substitution for the user invoking the macro.

I also only VIEW control cards so that I don't make any changes.

as all rexx scripts that I write belong to whichever customer has paid me for the effort, I have no examples to provide.

you should be able to find examples: google, documentation, any of the thousands of REXX websites.
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Wed Apr 15, 2009 11:06 pm    Post subject: Reply to: REXX Macro to wrap JCL around an ISPF edit session
Reply with quote

Thank you Enrico-sorichetti and Dick. Your suggestions have given me a starting point.
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 -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Running an REXX EXEC implicitly sho7hills CLIST & REXX 3 Thu Apr 20, 2017 8:14 am
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts RC 20 for Address ISPEXEC "ISRED... pkmurali CLIST & REXX 3 Sun Apr 16, 2017 11:30 pm
No new posts Edit large number of datasets (QSAM) zh_lad TSO/ISPF 3 Tue Apr 04, 2017 6:08 pm


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