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

REXX Macro to wrap JCL around an ISPF edit session


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10903
Location: italy

PostPosted: Wed Apr 15, 2009 9:41 pm
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: 6965
Location: porcelain throne

PostPosted: Wed Apr 15, 2009 9:44 pm
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
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 All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Trouble using REXX SDSF interface to ... CLIST & REXX 3
No new posts REXX to get all Dataset names from a ... CLIST & REXX 5
No new posts Instream REXX? JCL & VSAM 13
No new posts CEMT using Rexx? Help please CLIST & REXX 3
No new posts get submitted JCL from SDSF with REXX... CLIST & REXX 2
Search our Forums:


Back to Top