Posted: Thu Dec 08, 2016 12:51 pm Post subject: Check if File exist or not out of 250 files concatenated
Hi,
I have a job where 250 files are concatenated for INPUT dd name (for example I have 15 files only), before running the job I need to check if any of the 250 files does not exist which need to be removed before job run to avoid job abend. Below is the JCL, this need to be handled in batch mode so that before job run the check happens automatically and inform user the files which does not exist. or is there a way where job can be completed successfully even if some of the file does not exist out of the concatenated list of files.
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Thu Dec 08, 2016 1:42 pm Post subject:
dhansr,
You have couple of options
1. If your shop has a JCL checker software you can run it in batch and extract the messages for missing datasets.
2. Alternatively you can code an IEFBR14 step with DISP=(MOD,KEEP,DELETE) for all your files and even if the file did not exist it will be present for the actual program.
3. You can have listcat of the files based on HLQ and verify it against your list and Dummy them out. _________________ Kolusu
www.linkedin.com/in/kolusu
Option 3 is suitable for my requirement and I am using like below it works fine as I am able to search through the listcat output file through a program to find missing files.
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Fri Dec 09, 2016 10:48 am Post subject:
dhansr wrote:
Thank You ! Kolusu.
Option 3 is suitable for my requirement and I am using like below it works fine as I am able to search through the listcat output file through a program to find missing files.
You can add LASTCC check after every listcat and write the file name to a dataset and then dummy out the file in there _________________ Kolusu
www.linkedin.com/in/kolusu
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum