View previous topic :: View next topic
|
Author |
Message |
vicharapusrinu Warnings : 1 New User
Joined: 04 Dec 2006 Posts: 63 Location: Hyderabad
|
|
|
|
Hi,
Could you please help me out?
Below is the my requirement
File-1 is set and file-2 sub set(all records of file-2 will present in file-1, but vise-versa is NOT true)
Now I want to know which all records are missing in file-2, when compare to file-1.
File-1
File-2
Expected out of file-3
File-3
NOTE: content of all files is in BINARY format
Rgds,
Srini |
|
Back to top |
|
|
hailashwin
New User
Joined: 16 Oct 2008 Posts: 74 Location: Boston
|
|
|
|
Hi vicharapusrinu,
You can use the DFSORT job below.
Code: |
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//IN1 DD DSN=... input file1
//IN2 DD DSN=... input file2
//SORTOUT DD DSN=... output file
//SYSIN DD *
JOINKEYS F1=IN1,FIELDS=(1,2,A)
JOINKEYS F2=IN2,FIELDS=(1,2,A)
JOIN UNPAIRED,F1,ONLY
REFORMAT FIELDS=(F1:1,2)
OPTION COPY
//*
|
Thanks,
Ashwin. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
If the records in input file1 are already sorted (as shown in the example), it would be more efficient to add SORTED to the JOINKEYS statement for F1. If the records in input file2 are already sorted (as shown in the example), it would be more efficient to add SORTED to the JOINKEYS statement for F2.
Alternatively, assuming the two input files have the same RECFM and LRECL, you can use a DFSORT/ICETOOL job like the following:
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//CON DD DSN=... input file1
// DD DSN=... input file2
//OUT DD DSN=... output file
//TOOLIN DD *
SELECT FROM(CON) TO(OUT) ON(1,2,BI) NODUPS
/*
|
|
|
Back to top |
|
|
vicharapusrinu Warnings : 1 New User
Joined: 04 Dec 2006 Posts: 63 Location: Hyderabad
|
|
|
|
Dear Frank Yaeger/Lashwin.
I am glad to inform that it is working perfectly!!!!!!!!!!!!
Our forum help me so many times in order to know more about mainframe, I can't imagine my official life with out IBMMAINFRAMES.COM
Thanks, Thanks a lot Frank Yaeger and Lashwin.
Regards,
Srini. |
|
Back to top |
|
|
|