Hi,
I have a set of 100 files which gets archived. The format of the DSN is ABC.D<YYMM>.TEST
Only the <YYMM> part changes in the file names.
The file name ABC.D*.TEST in the list option displays all the 100 files. These files gets migrated after a certain period.
My requirement is to run a job to refresh all these file from the archive to recall it.
So, how this could be done. Kindly give your suggestions.
For a single file with following worked:
//STEP2 EXEC PGM=IEBGENER,COND=(0,NE,STEP1)
//SYSUT1 DD DSN=ABC.D0101.TEST,
// DISP=(OLD,CATLG)
//SYSUT2 DD DUMMY
//SYSIN DD *
/*
In STEP1, I checked the availability of the file 'ABC.D0101.TEST' using the LISTCAT option.
1. How this can be done for all the 100 files ?
2. Can a looping be done with symbolics changing the file name in STEP2 ?
3. Can the file names be extracted from the LISTCAT output and used in STEP2?
4. Another option available is to use the HRECALL command in the job. But, the issue faced is, if the file is not migrated and if it exists. An error message is thrown.
Also this could be done for one file. How to do it for all the 100 files ?
With the above queries, please help me out. Thanks in advance.