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: 10231
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: 6966
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
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Display FTP Session Count within TSO Yolanda Harvey TSO/ISPF 3 Fri Mar 10, 2017 10:31 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Customizing the ISPF HILITE Command Pedro TSO/ISPF 3 Fri Mar 03, 2017 11:49 pm
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm


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