1. I have 2 input files.First file is of LRECL 2054 with RECFM as F and it's field at position 50 of 10 bytes has to be overlayed using second input file of LRECL 220bytes RECFM F and field to be overlayed in First file is in position 170 of 10bytes of second file.
2. First file contains 10000 records and second file contains 4000 records.I need to repeat the same data in positon 170 of 10 bytes in 2nd file for rest of 6000 records in overlayed 1st file.
I dont want the data in column positons 50 to 60 of 1st input file file. I need to replace the data in column position 50 to 60 of 1st input file with 170 to 180 column position of 2nd input file.There is no matching key between 2 input files.Input file1 has 10000 records and input file 2 has 4000 records.I need to repeat the same data in 4000 records in remaining 6000 records of 1st file also.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
akash,
I still don't know what you want to do.
"50 of 10 bytes" is NOT the same as 50-60 which is 11 bytes. Which is it?
170 of 10 bytes" is NOT the same as 170-180 which is 11 bytes. Which is it?
Do you want to replace:
o 50-60 of input file1 record 1 with 170-180 of input file2 record 1
o 50-60 of input file1 record 2 with 170-180 of input file2 record 2
...
o 50-60 of input file1 record 4000 with 170-180 of input file2 record 4000
o 50-60 of input file1 record 4001 with 170-180 of input file2 record 1
...
o 50-60 of input file1 record 8000 with 170-180 of input file2 record 4000
o 50-60 of input file1 record 8001 with 170-180 of input file2 record 1
...
If not, please explain more clearly what you want to do. An example of input and expected output would help.
Positions 50 to 59 of input file 1
Positions 170 to 179 of input file 2.
Yes i am expecting the same output as you mentioned below
o 50-60 of input file1 record 1 with 170-180 of input file2 record 1
o 50-60 of input file1 record 2 with 170-180 of input file2 record 2
...
o 50-60 of input file1 record 4000 with 170-180 of input file2 record 4000
o 50-60 of input file1 record 4001 with 170-180 of input file2 record 1
...
o 50-60 of input file1 record 8000 with 170-180 of input file2 record 4000
o 50-60 of input file1 record 8001 with 170-180 of input file2 record 1
...