View previous topic :: View next topic
|
Author |
Message |
ashish_tech
New User
Joined: 28 Dec 2005 Posts: 1
|
|
|
|
I have two sequential files, FILE-1 and FILE-2.
FILE-1 contains 2 columns(A,B) and FILE-2 contains 3 columns
(C,D,E).I want an output file, FILE-3 which has all five
columns with duplicates eliminated from column A.
Let me know if need more details... |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
More details needed.......
Did you search before posting ? because this is a very common topic in both the JCL and DFSORT forums.
LRECL & RECFM for both files.
Do both files have the exact same number of records to perform a 1 to 1 merge, if not what happens in this case.
Do the duplicates get removed from column 1 before or after the two files are merged as this may affect the number of records in file 1 |
|
Back to top |
|
|
Mukesh Pandey
Active User
Joined: 11 Nov 2008 Posts: 143 Location: India
|
|
|
|
USE sort utility............ hope below explanation helps....
1. SORT FIELDS=COPY
It is for copy records to output file
2. INREC FIELDS=(7:2,5,20:10,3) (for formatting)
Here we have two formattings,
1. 7:2,5 - data at 2nd position of input file with length 5
copied to 7th position of output file
2. 20:10,3 - data at 10th position of input file with length 3
copied to 20th position of output file
........for eliminating duplicates, use ....
SUM FIELDS=NONE,XSUM |
|
Back to top |
|
|
Mukesh Pandey
Active User
Joined: 11 Nov 2008 Posts: 143 Location: India
|
|
|
|
expat, let me know if this works out assuming, lrecl, recfm and the number of records are same in two files. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Mukesh,
Unless the OP responds to the questions asked here, we cannot offer suggestions as he might know what is his requirement and not any of us. |
|
Back to top |
|
|
|