Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 10309
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: 6968
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 Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 2 Tue Sep 26, 2017 3:07 am
No new posts exec macro in the end of edit anatol CLIST & REXX 8 Fri Sep 22, 2017 5:10 am
No new posts Conditional highlighting of rows in I... packerm CLIST & REXX 2 Thu Sep 21, 2017 6:50 pm
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us