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 Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am
No new posts Sorting of hex values Saurabh_mi DFSORT/ICETOOL 11 Thu May 25, 2017 3:49 pm
No new posts Using ICETOOL, how we can seperate th... bshkris SYNCSORT 5 Tue May 09, 2017 8:33 pm


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