I am creating an output file using the below input.
Where I need to include the values in column 20: Values are (AD AM NONAD NONE) followed by DATE(YYMMDDHHMMSS) and SEQ (0000000001) numbers.
Input:
Code:
----+----1----+----2----+----3----+----4----+----5----+----6----+
***************************** Top of Data ***********************
00HEADER
162020152020 516 MISC
162020152020 516 MISC
162020152020 516 MISC
162020152020 516 MISC
99TRAILER
My output should be
Code:
----+----1----+----2----+----3----+----4----+----5----+----6----+----7-
***************************** Top of Data *****************************
00HEADER
162020152020 516 AD2007160625450000000001 MISC
162020152020 516 AM2007160625450000000002 MISC
162020152020 516 NONAD2007160625450000000003 MISC
162020152020 516 NONE2007160625450000000004 MISC
99TRAILER
I can achieve using three steps. Is there any other way I can accomplish in one step?
Thanks!
Now the values are (AD AM NONAD NONE)in the input file and not necessarily in the order mentioned above. The order will get shuffled daily.
Input File:
Code:
----+----1----+----2----+----3----+----4----+----5----+----6----+
***************************** Top of Data ***********************
00HEADER
162020152020 516 MISC AD
162020152020 516 MISC NONE
162020152020 516 MISC AM
162020152020 516 MISC NONAD
99TRAILER
Code:
Output.
----+----1----+----2----+----3----+----4----+----5----+----6----+----7-
***************************** Top of Data *****************************
00HEADER
162020152020 516 AD2007160625450000000001 MISC AD
162020152020 516 NONE2007160625450000000002 MISC NONE
162020152020 516 AM2007160625450000000003 MISC AM
162020152020 516 NONAD2007160625450000000004 MISC NONAD
99TRAILER
Is there an alternate way to achieve this in one step? Please let me know.
---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8-
********************************* TOP OF DATA **********************************
00HEADER
162020152020516AD2007315074100000001 MISC AD
162020152020516NONE2007315074100000002 MISC NONE
162020152020516AM2007315074100000003 MISC AM
162020152020516NONAD2007315074100000004 MISC NONAD
99TRAILER
******************************** BOTTOM OF DATA ********************************
From the whole discussion I can conclude that there are only, and always only 6 records in the input dataset, and four of them must be updated, isn't it?
If so, the correct solution should be: using ISPF text editor, to manually type missing data into the proper positions of those four records...