View previous topic :: View next topic
|
Author |
Message |
atulxp
New User
Joined: 27 Nov 2005 Posts: 15 Location: Phoenix
|
|
|
|
I have two file Old File O & new file N
I need comparision on first 15 char & in output file F unique records from file O & N should be retained however matching records should be taken from file N.
File O
X(15) X(53)
111111111111111 AAAAAA BBBBB AAAAAAA
222222222222222 BBBBBB AAAAA BBBBBBB
File N
222222222222222 AAAAAA BBBBB AAAAAAA
333333333333333 CCCCCC DDDDD CCCCCCC
File F
111111111111111 AAAAAA BBBBB AAAAAAA
222222222222222 AAAAAA BBBBB AAAAAAA
333333333333333 CCCCCC DDDDD CCCCCCC
Please suggest how this could be done via sort |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Please see the following - this request is asked regularly. Searching the forum would help you also.
If after reviewing the material, you have questions, please let us know. |
|
Back to top |
|
|
atulxp
New User
Joined: 27 Nov 2005 Posts: 15 Location: Phoenix
|
|
|
|
Hi
I have checked that but that is not resolving my problem fully. Please see problem statement. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
atulxp,
Here's a DFSORT/ICETOOL job that will do what you asked for. I assumed, as shown in your example, that there are no duplicates within file O and no duplicates within file N.
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//CON DD DSN=... input file O
// DD DSN=... input file N
//OUT DD DSN=,,, output file
//TOOLIN DD *
SELECT FROM(CON) TO(OUT) ON(1,15,CH) LAST
/*
|
|
|
Back to top |
|
|
|