MVSFORUMS.com A Community of and for MVS Professionals
View previous topic :: View next topic
Author
Message
ldushkin Beginner Joined: 05 Apr 2006 Posts: 56 Topics: 20
Posted: Fri Apr 28, 2006 9:34 am Post subject: Remove Duplicates from file and write dups into another file
Hi all!!!!!!!!!!!!!!!!!!!!!!!!!
Please help me with my JCL.
I have one input file, I need to remove dups and copy to output only 11 char.
This is my JCL
Code:
//STEP002 EXEC PGM=SYNCSORT
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SORTIN DD DSN=D2HG.COPY.REC,
// DISP=SHR
//SORTOUT DD DSN=D2HG.COPY.REC.OUT,
// DISP=(,CATLG,DELETE),
// SPACE=(CYL,(400,100),RLSE)
//SORTXSUM DD DSN=D2HG.COPY.REC.DUPS,
// DISP=(,CATLG,DELETE),
// SPACE=(CYL,(400,100),RLSE)
//SORTWK01 DD SPACE=(CYL,(200,20),RLSE)
//SORTWK02 DD SPACE=(CYL,(200,20),RLSE)
//SORTWK03 DD SPACE=(CYL,(200,20),RLSE)
//SYSIN DD *
SORT FIELDS=(1,11,CH,A)
SUM FIELDS=NONE,XSUM,
OUTREC FIELDS=(1:1,11)
INput:
583486633A ROSADO WILFRED
108240038B CABAN CARMEN
108240038B CABAN CARMEN
expect output:
file1
583486633A
108240038B
file2
108240038B
I got Error:
SYSIN :
SORT FIELDS=(1,11,CH,A)
SUM FIELDS=NONE,XSUM,
OUTREC FIELDS=(1:1,11)
*
WER268A SUM STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
******************************* Bottom of Data
Back to top
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Fri Apr 28, 2006 9:49 am Post subject:
ldushkin ,
You have an extra COMMA after XSUM. Remove that and re-run your Job.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu
Back to top
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Fri Apr 28, 2006 9:50 am Post subject:
ldushkin,
Be warned that if you keep posting the same question in more than 1 topic, you will never ever receive an answer from this board
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu
Back to top
ldushkin Beginner Joined: 05 Apr 2006 Posts: 56 Topics: 20
Posted: Fri Apr 28, 2006 10:01 am Post subject:
It was my mistake I'm so sorry.
Thank you very much for your help.
I ran successfuly, but second file copy full record.
ex:
D2HG.COPY.REC.DUPS
108240038B CABAN CARMEN EF19280612
Back to top
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Fri Apr 28, 2006 10:11 am Post subject:
ldushkin ,
Change your control cards to the following and re-run your job
Code:
INREC FIELDS=(1:1,11)
SORT FIELDS=(1,11,CH,A)
SUM FIELDS=NONE,XSUM
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu
Back to top
ldushkin Beginner Joined: 05 Apr 2006 Posts: 56 Topics: 20
Posted: Fri Apr 28, 2006 10:19 am Post subject:
Thanks for any assistance you can provide
Back to top
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum