MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Remove Duplicates from file and write dups into another file

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
ldushkin
Beginner


Joined: 05 Apr 2006
Posts: 56
Topics: 20

PostPosted: Fri Apr 28, 2006 9:34 am    Post subject: Remove Duplicates from file and write dups into another file Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Fri Apr 28, 2006 9:49 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Fri Apr 28, 2006 9:50 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
ldushkin
Beginner


Joined: 05 Apr 2006
Posts: 56
Topics: 20

PostPosted: Fri Apr 28, 2006 10:01 am    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Fri Apr 28, 2006 10:11 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
ldushkin
Beginner


Joined: 05 Apr 2006
Posts: 56
Topics: 20

PostPosted: Fri Apr 28, 2006 10:19 am    Post subject: Reply with quote

Thanks for any assistance you can provide
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group