c62ap90 wrote:Doing this task if fairly easy but explaining how to do it is not so easy in a forum.
What I have done for these kinds of tasks is create an Easytrieve to read in the 2000 file names and create output similar to JCL code below to determine if file is empty. In the Easytrieve you would need to increment the step name for each record read (STEP001, STEP002, etc.) so that you could examine the Return Code, and of course replace FILEA DSN for each record read.
Creating 2,000 jobs, or one job with 2,000 steps? (Which of course will not run.)
As Mr. Scherrer suggests, some Rexx that tailors a skeleton, creating one job with two steps (one that runs,
e.g., IDCAMS to determine if the target data set is empty or not, and one to parse the IDCAMS output and assemble the output data set), would be more appropriate.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day