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 

copying duplicates into another file

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
nadh
Intermediate


Joined: 08 Oct 2004
Posts: 192
Topics: 89

PostPosted: Wed Jun 15, 2005 6:22 am    Post subject: copying duplicates into another file Reply with quote

Hi, my requirement is to strip first 8 characters from flat file and eliminate duplicates and write the eliminated duplicates to another file.
I have written the following jcl by searching in the site.
Code:

//STEP0100 EXEC PGM=SORT                                     
//SYSOUT   DD SYSOUT=*                                       
//SORTIN   DD DSN=DFE.DB20342A.TS02613A.LOAD.APR1,           
//            DISP=SHR                                       
//SORTOUT  DD DSN=DFE.DB20342A.TS02613A.LOAD.TEMP,DISP=OLD   
//          DISP=(NEW,CATLG,DELETE),                       
//            UNIT=SYSDA,                                     
//            SPACE=(CYL,(1,1),RLSE)                         
//SYSIN    DD * 
  SORT FIELDS=COPY                                           
  OUTREC FIELDS=(9,145) 
  SUM FIELDS=NONE
/*
//                                 

Pls. suggest me whether it is correct. i did not code for copying duplicated to another file. pls. suggest me the step to do that.

thanks in advance
nadh.
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Jun 15, 2005 6:29 am    Post subject: Reply with quote

Nadh,

Did you even bother to search before posting? It gets quite frustrating to remind even senior members to search before posting.

check these links

http://www.mvsforums.com/helpboards/viewtopic.php?t=8&highlight=duplicates

http://www.mvsforums.com/helpboards/viewtopic.php?t=431&highlight=duplicates

http://www.mvsforums.com/helpboards/viewtopic.php?t=1505&highlight=duplicates

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Wed Jun 15, 2005 9:58 am    Post subject: Reply with quote

Quote:
suggest me whether it is correct.


No, it is not correct because you have SORT FIELDS=COPY. "Duplicate" records means that the records have the same value for the key. With SORT FIELDS=COPY, you're doing a copy operation, so there is no key. You need to use SORT FIELDS=(p,m,f,s) or MERGE FIELDS=(p,m,f,s) where p,m,f,s is the key which defines which records are duplicates.
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) 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