I'm new using REXX. I would like to build a script that will generate jobs that require to loop the Jobname field. For example. I have to copy 500 DSN's but I need to submit the copy jobs five at time.
What I have built so far is able to create all 500 copy jobs
But upon adding the new rexx code, it loops the jobname COPY01 - COPY05 to every single DSN. Leaving me with 2500 copy jobs, basically 5 copy jobs for every single DSN. I would only like to break down all 500 copy jobs so they will only loop the jobname once through the first 5 DSN's and continue looping until all 500 built.
Here is what I have so far:
"EXECIO 1 DISKR INFILE"
IF RC = 2 THEN LEAVE
DO TC=I TO 05 BY 1
DSN = SUBSTR(INFILE_REC,1,10)
JDSN = DSN
QUEUE "//COPY"TC" JOB (P,VZFT,XO0938),'DSN-"JDSN"', "