Joined: 20 Oct 2006 Posts: 6967 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.