List - I am a very basic Cobol programmer - openfile/read rec/write rec/close file
What I need to understand is how to do the following I want to either pass a parm or a DD statement that contains a GDG Base //S1 EXEC PGM=X,PARM='GDGBASE' Or //S1 EXEC PGM=X //GDGBASE DD DISP=SHR,DSN=gdgbase,GDGORDER=LIFO Read the GDG backwards I prefer the second case with the DD statement The program would need to do the following 1) Identify the GDG base and what the To/From GDG Numbers are. I cannot use Relative numbers as GDGs are always being created, so when the program starts I want just the ones created at that time this program begins to execute. So it could be G0001V00 to G0010V00 or G0997V00 through G1010V00 etc... 2) Once the GDGs are identified, read through them one at a time So open gdgbase.G0001V00 Read the entire GDG and write it to a report repository Once completed, move this GDG number to a backup file in-case there are issues with the report in the repository Display a message to a log the GDG was successfully or unsuccessfully read Go to the next GDG. Continue until all are read and added to the Report Repository The GDG reports can be from 1 line to millions of lines. No way to know until the file is read. My question is this How can I tell Cobol to read the concatenation of GDGs one at a time? Is there anything needed in the FILE SECTION or INPUT OUTPUT Section or FILE CONTROL? I have not done this type of coding, so this is new to me. Using Assembler would be easier, but this needs to be in Cobol. Or any other suggestion appreciated. I could do this easily in REXX but that is not the design request at this time. Thanks Lizette Koehler statistics: A precise and logical method for stating a half-truth inaccurately ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
