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 write/store the second duplicate while sorting

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
deepam25

New User


Joined: 14 Jul 2007
Posts: 3
Location: bangalore

PostPosted: Mon Aug 13, 2007 11:47 am    Post subject: How to write/store the second duplicate while sorting
Reply with quote

in sort if we find duplicates it produce the first duplicate value hoe to store the 2 duplicate value
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Mon Aug 13, 2007 9:05 pm    Post subject:
Reply with quote

Quote:
in sort if we find duplicates it produce the first duplicate value hoe to store the 2 duplicate value


Please show an example of the records in the input file and the expected output records. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input file.
Back to top
View user's profile Send private message
Deepa.m
Warnings : 1

New User


Joined: 28 Apr 2005
Posts: 99

PostPosted: Tue Aug 14, 2007 6:53 pm    Post subject: Re: How to write/store the second duplicate while sorting
Reply with quote

I tried to get a solution..

Code:

//S1     EXEC PGM=SORT                                           
//SORTIN    DD DSN=I/P
//SORTOUT   DD DSN=O/P         
//SYSOUT DD SYSOUT=*                                               
//SYSPRINT DD SYSOUT=*                                             
//SYSIN  DD *                                                       
  OPTION COPY                                         
  INREC  IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,8,ZD,RESTART=(1,5))) 
  OUTFIL INCLUDE=(81,8,ZD,EQ,2)                                     
/*   


but stuck up with removing the seqnum from the output file.
Back to top
View user's profile Send private message
shankar.v

Active User


Joined: 25 Jun 2007
Posts: 196
Location: Bangalore

PostPosted: Tue Aug 14, 2007 7:12 pm    Post subject:
Reply with quote

Code:

  INREC OVERLAY=(81:SEQNUM,8,ZD,RESTART=(1,5))
  OUTFIL INCLUDE=(81,8,ZD,EQ,2),OUTREC=(1,80)
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts Efficient sorting chandracdac DFSORT/ICETOOL 5 Sat Oct 22, 2016 3:23 am
No new posts Error IEC161I 052(009,XXXRS00)-084 wh... amitc23 JCL & VSAM 10 Wed Oct 12, 2016 5:00 pm
No new posts Stripping and Sorting of VB file G SRINIVASA RAO SYNCSORT 5 Wed Sep 14, 2016 1:34 pm
No new posts how to DYNAMICALLY write sort cond to... mohamedmubee COBOL Programming 13 Fri Aug 26, 2016 11:46 pm


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