We have a program in nightly batch which refers a GDG for input. One/More file is recieved daily from external system as latest version of the GDG. The program reads the GDG Base to find out all versions which werent processed. The GDG is defined as
GDG dataset limit: 60
Uncatalog options: NOEMPTY
Scratch options: SCRATCH.
Now the issue is, the program abends with S0C7 abend when the 60th version of the GDG is created and processed by the program.
As a temporary solution, we rename the processed versions to make the latest version less than 60 and program goes fine.
I am not sure but to me it seems issue in GDG allocation. I tried reallocation and it didnt worked.
The program PROG123 access all versions of input file (DCFI) through GDG BASE, and reads the date and time stamp on header record, and compare it with Date and Time stamp on parameter file. All files which have greater date and time stamps, are copied to a new temporary file, which is processed in the next program.
This program PROG123 is abending with S0C7, when the number of versions becomes more than GDG Dataset Limit (60 here). The run instance where 61st version is created in GDG (1st version is deleted as it is SCRATCH), we face the S0C7 abend.
Is it related to GDG BASE definition in any way?
Can u or somebody suggest me better way to copy all unprocessed files in a temporary file using some parameter file?