Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to eliminate first duplicate record in PS file?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
jaganmoni1

New User


Joined: 31 Oct 2008
Posts: 33
Location: CANADA

PostPosted: Tue Mar 17, 2009 5:25 pm    Post subject: How to eliminate first duplicate record in PS file?
Reply with quote

Hi,

My input PS file is FB and record length of 135 bytes. The key value in the file is located from column 32 to 45 (i.e. 14 bytes).
At any time I have only two duplicate records in the input file based on the key value.

//SYSIN DD *
SORT FIELDS=(32,14,CH,A)
SUM FIELDS=NONE,XSUM
/*
//

If I use the above control card, it eliminates the second duplicate record and writes the first duplicate record in the output file.

But I want second duplicate record instead of first duplicate record in the output file. Please help me on the same...
Back to top
View user's profile Send private message

Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2294
Location: @my desk

PostPosted: Tue Mar 17, 2009 5:44 pm    Post subject:
Reply with quote

jaganmoni1,

You can use the below SYNCTOOL job to achieve what you want.
Code:
//STEP1    EXEC PGM=SYNCTOOL               
//TOOLMSG  DD SYSOUT=*                     
//DFSMSG   DD SYSOUT=*                     
//IN       DD DSN= Input file             
//OUT      DD DSN= Output file             
//TOOLIN   DD *                           
  SELECT FROM(IN) TO(OUT) ON(32,14,CH) LAST
Back to top
View user's profile Send private message
jaganmoni1

New User


Joined: 31 Oct 2008
Posts: 33
Location: CANADA

PostPosted: Tue Mar 17, 2009 6:03 pm    Post subject: Reply to: How to eliminate first duplicate record in PS file
Reply with quote

its working fine... Thanks a lot for your quick reply
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to select record x+7 or x+2 based... JoAnn Kulcyk SYNCSORT 0 Tue Jan 16, 2018 10:49 pm
No new posts COB2 file processing rizwanaccy COBOL Programming 8 Tue Jan 02, 2018 1:00 pm
No new posts KSDS and Index file in cobol deepak14450 COBOL Programming 9 Fri Dec 22, 2017 9:36 am
No new posts Preserve order in Input File pshongal DFSORT/ICETOOL 13 Thu Dec 21, 2017 4:20 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us