I have a requirement in which I need to prepare footer in a specific format mentioned below.
Sample Input dataset(FB,LRECL=537):
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8....
ABC ABC ABC ABC ABC 2009-12-14-01.00.00.000000ABC 123 123 123 123 123 123 123 1....
ABC ABC ABC ABC ABC 2009-12-14-02.00.00.000000ABC 123 123 123 123 123 123 123 1....
ABC ABC ABC ABC ABC 2009-12-14-03.00.00.000000ABC 123 123 123 123 123 123 123 1....
ABC ABC ABC ABC ABC 2009-12-14-04.00.00.000000ABC 123 123 123 123 123 123 123 1....
ABC ABC ABC ABC ABC 2009-12-14-01.00.00.000000ABC 123 123 123 123 123 123 123 1....
ABC ABC ABC ABC ABC 2009-12-14-02.00.00.000000ABC 123 123 123 123 123 123 123 1....
ABC ABC ABC ABC ABC 2009-12-14-03.00.00.000000ABC 123 123 123 123 123 123 123 1....
ABC ABC ABC ABC ABC 2009-12-14-04.00.00.000000ABC 123 123 123 123 123 123 123 1....
Sample Output dataset:
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8....
ABC ABC ABC ABC ABC 2009-12-14-01.00.00.000000ABC 123 123 123 123 123 123 123 1....
ABC ABC ABC ABC ABC 2009-12-14-02.00.00.000000ABC 123 123 123 123 123 123 123 1....
ABC ABC ABC ABC ABC 2009-12-14-03.00.00.000000ABC 123 123 123 123 123 123 123 1....
ABC ABC ABC ABC ABC 2009-12-14-04.00.00.000000ABC 123 123 123 123 123 123 123 1....
SOURCEF_15122009151220091412200900:00:001412200923:59:59APPL V 1.0 82
ABC ABC ABC ABC ABC 2009-12-14-01.00.00.000000ABC 123 123 123 123 123 123 123 1....
ABC ABC ABC ABC ABC 2009-12-14-02.00.00.000000ABC 123 123 123 123 123 123 123 1....
ABC ABC ABC ABC ABC 2009-12-14-03.00.00.000000ABC 123 123 123 123 123 123 123 1....
ABC ABC ABC ABC ABC 2009-12-14-04.00.00.000000ABC 123 123 123 123 123 123 123 1....
SOURCEF_15122009151220091412200900:00:001412200923:59:59APPL V 1.0 82
Footer format:
COLS: 1-7 - FILE NAME
COLS: 8 - Filler(UNDERSCORE)
COLS: 9-16 - SYSTEM DATE(Format – MMDDYYYY)
COLS: 17-24 -SYSTEM DATE(Format – MMDDYYYY)
COLS: 25-32 -VALUE FROM INPUT FILE AT THE COLS: 22-32(Format converted to – MMDDYYYY)
COLS: 33-40 -HARD CODED TEXT(00:00:00)
COLS: 41-48 -VALUE FROM INPUT FILE AT THE COLS: 22-32(Format converted to – MMDDYYYY)
COLS: 49-56 -HARD CODED TEXT(23:59:59)
COLS: 57-62 -HARD CODED TEXT(APPL V)
COLS: 63-66 -HARD CODED TEXT(1.00)
COLS: 67-76 -INPUT FILE RECORD COUNT
COLS: 8 - Filler(UNDERSCORE)
COLS: 9-16 - SYSTEM DATE(Format – MMDDYYYY)
COLS: 17-24 -SYSTEM DATE(Format – MMDDYYYY)
COLS: 25-32 -VALUE FROM INPUT FILE AT THE COLS: 22-32(Format converted to – MMDDYYYY)
COLS: 33-40 -HARD CODED TEXT(00:00:00)
COLS: 41-48 -VALUE FROM INPUT FILE AT THE COLS: 22-32(Format converted to – MMDDYYYY)
COLS: 49-56 -HARD CODED TEXT(23:59:59)
COLS: 57-62 -HARD CODED TEXT(APPL V)
COLS: 63-66 -HARD CODED TEXT(1.00)
COLS: 67-76 -INPUT FILE RECORD COUNT
I have a JCL which prepares the footer in the format above. Please hlep me in extracting the date from the input file from the specific columns from the input dataset and prepare the footer in the format mentioned above.
OPTION COPY
OUTFIL REMOVECC,
TRAILER1=('SOURCEF_',9:DATENS=(DM4),17:DATENS=(DM4),
25:DATENS=(DM4),33:'00:00:00',41:DATENS=(DM4),
49:'23:59:59',57:'APPL V 1.0',CT)
OUTFIL REMOVECC,
TRAILER1=('SOURCEF_',9:DATENS=(DM4),17:DATENS=(DM4),
25:DATENS=(DM4),33:'00:00:00',41:DATENS=(DM4),
49:'23:59:59',57:'APPL V 1.0',CT)
Where CT is the record count extracted from the previous step.
Thanks in advance.
Regards,
Siva