I have a requirement where I have to copy around 10000 files daily. These files are created during different times of the day. And after the files are created, I have to create the copy. I can't modify the existing jobs which create the file to include a new copy step as I have to modify 10000 jobs. I don't want to create 10000 new jobs as successor jobs as these will be new scheduling effort as well as creation of jobs. I was considering the below 2 options but couple of issues I am not able to solve to reach the Solution.
1. Schedule a job (Job A )every 15 minutes which will read a file that has the 10000 filenames and write a Cobol program with INTRDR option which will create another job (Job B) with the copy steps on the fly and submit the job B. But I need another file to be input for my Cobol program which will tell me the jobs completed in the 15 mins so that I can include the files created in those jobs in my Job B. We have CA7 OPC Scheduler and I am not sure how to identify the jobs that completed in last 15 mins in batch. I can go to the scheduler through TSO Menu but not sure how I can get it realtime in batch.
2. Schedule a REXX job every 15 minutes which will read the files and get the creation date. If the creation date is equal to today's date then copy the file. It will work for GDG but I will face the issue when the file is still being written and I will try to copy it. Also for flat files that get overwriiten everyday it will have the original creation date but not today's date.
Any suggestions or other options will help.