File 1 ABC(position 5,3) should be replaced in File 2
Posted: Mon Oct 15, 2012 12:56 pm
Requirement File 1 ABC(position 5,3) should be replaced in File 2 (14,3) in header record only(detail and trailer should be as it is ) i want to achieve this thru sort or icetool
Note : there is no key fields in two files (file 1 will have only ABC in all the records no other value)
File 1 FB/LRECL 22
-----------------------
1234ABC
5678ABC
1111ABC
File 2 FB/LRECL 39
-----------------------
0000000000BBBXYZ20121015 =====> header record
1111111111CCC12345678911 =====> detail records
2111111111CCC12345678912 =====> detail records
3111111111CCC12345678911 =====> detail records
4111111111CCC12345678911 =====> detail records
9999999999000000004 =====> trailer record
Output file FB/LRECL 39
-----------------------------
0000000000BBBABC20121015 =====> header record ==('ABC' should be replaced in position(14,3))
1111111111CCC12345678911 =====> detail records
2111111111CCC12345678912 =====> detail records
3111111111CCC12345678911 =====> detail records
4111111111CCC12345678911 =====> detail records
9999999999000000004 =====> trailer record
Any one please do a quick reply would be very much appreciated
Note : there is no key fields in two files (file 1 will have only ABC in all the records no other value)
File 1 FB/LRECL 22
-----------------------
1234ABC
5678ABC
1111ABC
File 2 FB/LRECL 39
-----------------------
0000000000BBBXYZ20121015 =====> header record
1111111111CCC12345678911 =====> detail records
2111111111CCC12345678912 =====> detail records
3111111111CCC12345678911 =====> detail records
4111111111CCC12345678911 =====> detail records
9999999999000000004 =====> trailer record
Output file FB/LRECL 39
-----------------------------
0000000000BBBABC20121015 =====> header record ==('ABC' should be replaced in position(14,3))
1111111111CCC12345678911 =====> detail records
2111111111CCC12345678912 =====> detail records
3111111111CCC12345678911 =====> detail records
4111111111CCC12345678911 =====> detail records
9999999999000000004 =====> trailer record
Any one please do a quick reply would be very much appreciated