View previous topic :: View next topic
|
Author |
Message |
kedianirmal
New User
Joined: 08 Feb 2008 Posts: 82 Location: Bangalore, India
|
|
|
|
Hi,
I want to reject the duplicate records from a file which can be achieved by SUM FIELDS=NONE. But i want the rejected records to be written to file 2.
Can somebody help.
Regards,
Nirmal |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Though I did not get what exactly you are referring to by "reject", however, it looks like you need "sortxsum DDname", please search on xsum in JCL/DFsort part of the Forum. Hopefully it will serve your purpose. |
|
Back to top |
|
|
kedianirmal
New User
Joined: 08 Feb 2008 Posts: 82 Location: Bangalore, India
|
|
|
|
Example
1111111111111111111A
1111111111111111111B
2222222222222222222A
3333333333333333333A
3333333333333333333B
the master output file should have
1111111111111111111A
2222222222222222222A
3333333333333333333A
and the duplicate reject file should have data
1111111111111111111B
3333333333333333333B |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Wish you could have searced the forum:
ibmmainframes.com/viewtopic.php?t=966&highlight=xsum
if ice/synctool is your choice:
Code: |
.
.
SELECT FROM(INDD) TO(OUTDD) ON(1,?,CH) ALLDUPS -
DISCARD(OTHERDD)
//INDD DD DISP=SHR,DSN=...INPUT
//OUTDD DD DISP=(,CATLG,DELETE),LRECL=XX,RECFM=XX,
// SPACE=(XXX,(XX,XX),RLSE),
// DSN=...OUTPUT
//OTHERDD DD DISP=(,CATLG,DELETE),LRECL=XX,RECFM=XX,
// SPACE=(XXX,(XX,XX),RLSE),
// DSN=DISCARDD |
|
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
You can also code the following SyncSort for z/OS 1.3 job:
Code: |
//STEP1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
1111111111111111111A
1111111111111111111B
2222222222222222222A
3333333333333333333A
3333333333333333333B
//SORTOUT DD DSN=MASTER.OUTPUT
//SORTXDUP DD DSN=DUPLICATE.RECORDS
//SYSIN DD *
SORT FIELDS=(1,19,CH,A)
DUPKEYS FIELDS=NONE,XDUP
/* |
|
|
Back to top |
|
|
kedianirmal
New User
Joined: 08 Feb 2008 Posts: 82 Location: Bangalore, India
|
|
|
|
Thanks all |
|
Back to top |
|
|
|