Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 2238
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 Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Record Not found in AlX but record re... mukun264 COBOL Programming 7 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us