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: 2352
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 IDCAMS RENAMING VSAM FILE ALONG WITH ... upendrasri JCL & VSAM 11 Tue Apr 17, 2018 10:42 pm
No new posts VSAM file NOT Found error while proce... SumaReva CICS 5 Wed Apr 11, 2018 9:54 pm
No new posts VSAM - Accessing beyond record size Benchwarmer JCL & VSAM 6 Wed Apr 11, 2018 9:20 pm
No new posts Duplicate PARM on OUTFIL sancraig16 SYNCSORT 11 Thu Apr 05, 2018 10:25 pm
No new posts converting a mainframe file with ASA ... Lynne Schuler All Other Mainframe Topics 5 Wed Apr 04, 2018 9:44 am

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