Page 1 of 1

How to merge two files on different position in file.

Posted: Wed Sep 09, 2015 10:37 pm
by Akshya Kumar
Hi

I want to merge two files from different position in each file, is that possible? Can anybody suggest please.

Input file1:

Code: Select all

Field1 Data1 
Field2 Data2 		
Field3 Data3 
Field4 
Field5 
Field6 
Input file2:

Code: Select all

Field1 
Field2 
Field3 
Field4 Data4 
Field5 Data5 
Field6 Data6 
Expected Output File:

Code: Select all

Data1 Data2 Data3 Data4 Data5 Data6 

Re: How to merge two files on different position in file.

Posted: Thu Sep 10, 2015 12:15 am
by William Collins
Look at ICETOOL's RESIZE operator. Concatenate the two files for input. Specify a USING file. In that, use OMIT COND= to drop the records which have blanks, use INREC to BUILD a record which is 8,5 plus a blank. RESIZE from six to 36.

Re: How to merge two files on different position in file.

Posted: Thu Sep 10, 2015 11:43 am
by Akshya Kumar
Thanks for the hints William. I could spot this link http://www-01.ibm.com/support/knowledge ... erator.htm. Will work on this to make the final sort statements.