Hi, I’ve created a little utility to generate and submit (using REXX QUEUE/submit) a bunch of DB2 Load jobs (each job loads a specific db table).
Right now, every job gets submitted one after the other without waiting for the previous job (submitted) to be completed.
I’m trying to think about creative ways, using REXX, to force the utility to wait for the previous job to finish before submitting the next one.
The only thing I could come up with is to check if a Load job’s input dataset is “locked” (by the job itself), if that’s even possible, and wait until it is “free” for the next job to be submitted. But the problem with this is that the second job could potentially start before the first one has the time to open the file. Might not work.