I have two files. I have to merge two files into one file. But I have to select only few but different columns from both the files. For eg:
I need output file containing
Can anybody tell me if this is possible using ICETOOL or DFSORT utilities. If yes, which command can be used. Thanks!
There is no specific method actually. But if you see the above example. I have to copy column 1 to 3 and 10 to 12 from file1 and column 4 to 6 and 13 to 15 from file2. I dont have to check for any keys. Just I have to select these columns and write in a new file.
Having established that there may be equal values on the "keys" in the files, you will lose data if the last record of the first file has the same value as the first record of the second file.
You are only getting the correct output because the 999 value in the first record of the second file is "protecting" the other records on the second file from being selected "early". If the 999 appear last, the 333 record will appear in an inconvenient order.
What are the RECM and LRECL of your two input files?