Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
we dont use ice tool we use ordinary Sort utility |
I don't know what you mean by this. If you use DFSORT, then you have DFSORT's ICETOOL available. ICETOOL has been shipped free with DFSORT since 1991.
If you want the nonduplicate records between the two files as output, you can use a DFSORT/ICETOOL job like this:
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//CON DD *
12345 som
23456 shankar
// DD *
12345 som
12346 stella
23456 shankar
/*
//OUT DD SYSOUT=*
//TOOLIN DD *
SELECT FROM(CON) TO(OUT) ON(1,15,CH) NODUPS
/*
|
|
|
cpuhawg
Active User
Joined: 14 Jun 2006 Posts: 331 Location: Jacksonville, FL
|
|
|
|
If you have regular SYNCSORT, you probably have SYNCTOOL that can be used select your data:
Code: |
//SYNCTOOL EXEC PGM=SYNCTOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SORTIN DD DSN=FILE1,DISP=SHR
// DD DSN=FILE2,DISP=SHR
//TEMPFILE DD DSN=&&TEMPFILE,DISP=(NEW,PASS),
// UNIT=SYSDA,SPACE=(TRK,(100,25),RLSE),
// RECFM=FB,LRECL=80,BLKSIZE=27920
//NODUPS DD DSN=OUTPUT.FILE,DISP=(NEW,CATLG),
// UNIT=SYSDA,SPACE=(TRK,(100,25),RLSE),
// RECFM=FB,LRECL=80,BLKSIZE=27920
//TOOLIN DD *
COPY FROM(SORTIN) TO(TEMPFILE) USING(CTL1)
SELECT FROM(TEMPFILE) TO(NODUPS) ON(1,80,CH) NODUPS
/*
//CTL1CNTL DD *
SORT FIELDS=(1,80,CH,A)
END
|
The SORTIN DD statement brings in both files, sorts them (1,80,CH,A), and writes them to TEMPFILE. The SYNCTOOL program then copies all records from TEMPFILE and removes all duplicates (records exactly the same in positions 1 through 80). What are not duplicates should be written to the NODUPS DD statement.
If you used ALLDUPS instead of NODUPS, your NODUPS output file would contain only the duplicates.
I was not able to test the JCL because SYNCTOOL is not available to me. |
|