View previous topic :: View next topic
|
Author |
Message |
zavedali85
New User
Joined: 17 Oct 2008 Posts: 10 Location: Pune
|
|
|
|
hi i have 2 files: File1 and File2
The records present in file1:
9600000000
9700000000
9800000000
The records present in file2:
9400000000
9500000000
9600000000
9700000000
I want the output in 3rd file as
9700000000
9800000000
i.e The duplicates present in the 2 files and
In forth file i need the non duplicates
please help me with the sort.
Thanks |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
zavedali85,
Your output does NOT match your requirements. How did 9800000000 be in the output as a duplicate? It is only present in file1.
Answer the following questions
1. What is the LRECL & RECFM of the input file 1
2. What is the Key position and format in input file 1
3. Do you have duplicates on the key in file1?
4. What is the LRECL & RECFM of the input file 2
5. What is the Key position and format in input file 2
6. Do you have duplicates on the key in file2?
7. What is the LRECL and RECFM of output files?
8. Show us an example of input and desired output |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
are there duplicates in either file ?
what are the matching keys ?
What is the RECFM and LRECL ?
Gerry |
|
Back to top |
|
|
zavedali85
New User
Joined: 17 Oct 2008 Posts: 10 Location: Pune
|
|
|
|
sorry..
it was a typo:
The output i am looking in the 3rd file is
9600000000
9700000000
file1:
Record format . . . : FB
Record length . . . : 100
file2
Record format . . . : FB
Record length . . . : 100
Key postion in file1:
1-10
Key postion in file2:
1-10
For output files file3 and file4
Record format . . . : FB
Record length . . . : 100
We dont have duplicates in either files. |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
zavedali85,
use the following DFSORT/ICETOOL JCL
Code: |
//STEP0100 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=Your 100 byte file1,DISP=SHR
// DD DSN=Your 100 byte file2,DISP=SHR
//OUT1 DD SYSOUT=*
//OUT2 DD SYSOUT=*
//TOOLIN DD *
SELECT FROM(IN) TO(OUT1) ON(1,10,CH) ALLDUPS DISCARD(OUT2) USING(CTL1)
//CTL1CNTL DD *
OUTFIL FNAMES=OUT1,REMOVECC,NODETAIL,
SECTIONS=(1,10,HEADER3=(1,100))
OUTFIL FNAMES=OUT2
//* |
|
|
Back to top |
|
|
|