View previous topic :: View next topic
|
Author |
Message |
cpuhawg
Active User
Joined: 14 Jun 2006 Posts: 331 Location: Jacksonville, FL
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
here is a snippet for the wrapping, Youl will have to carry on a bit of homework to have a running macro
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
cpuhawg
Active User
Joined: 14 Jun 2006 Posts: 331 Location: Jacksonville, FL
|
|
|
|
Thank you Enrico-sorichetti and Dick. Your suggestions have given me a starting point. |
|
Back to top |
|
|
|