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 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 How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Sorting on text - but in non-alphabet... Roy Ware SYNCSORT 5 Wed Aug 23, 2017 9:15 pm
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am

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