REXX is probably your best bet, but in the 1970s and 1980s, REXX wasn't
available on MVS and I often used the AREAD capability of ASMH (also
available in HLASM) to generate job streams. See example below (it's
been a while, correct syntax is NOT guaranteed):
MACRO
JPUNCH
.LOOP ANOP
AREAD &CARD
AIF ('&CARD' EQ '').EOJ
PUNCH '&CARD'
AGO .LOOP
.EOJ END
MEND ---------------
JPUNCH , <---------- execute macro and read data cards
PFX TUSER.HH
RST ADCD.A.CNTL
RST ADCD.LIB.JCL
/*
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html