I've a sample input file and output files are as below.
My input file is
OUPUT File after excluding 14NJ and having only 09IN in output file after reformating should be as below
In output last 8 characters are from header date.
The complete requirement is as below for above example.
I've a input file. From this file I need to include only records having â€˜09INâ€™ in first 4 characters in file and reformat the file as below.
The format of the output file is as below.
POS 1-4 IN REFORMATTED FILE SHOULD BE Pos 1-2 AND Pos 3-4 OF INPUT FILE AND Value should always be set to 7808
Pos 5-14 IN REFORMATTED FILE SHOULD BE Pos 10-12 ,Pos 13-15 and
Pos 16-19 of input file
Pos 15-24 IN REFORMATTED FILE SHOULD BE Pos 23-25,Pos 26-28 and
Pos 29-32 of input file
Pos 25-29 IN REFORMATTED FILE SHOULD B Pos 20-22 of input file
Pos 30-39 in reformatted file should be Reserved (Populate w/ spaces)
Pos 40-43 in reformatted file should be Pos 5-8 of input file
Pos 44-47 in reformatted file should be Pos 50-53 of input file
Pos 48 in reformatted file should be Populate â€˜Yâ€™
Pos 49-54 in reformatted file should be Pos 23-25 and Pos 26-28 of input file
Pos 55 in reformatted file should be Pos 9 of input file
Pos 56-63 in reformatted file should be Pos 15-22 in input header record (which is date)
Pos 64-70 in reformatted file should be Populate spaces
Please suggest me the sort code to do this.
In input dataset Header is starting with low values(hex 0000) and Trailer with high values(hex FFFF). I need to include this header and trailer along with detail records, but detail records should be only '09IN'
"Pos 56-63 in reformatted file should be Pos 15-22 in input trailer record "
Please suggest me the sort code.
Thanks & Regards