IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need a sequence number for the Keys


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
MGayathri

New User


Joined: 19 May 2007
Posts: 25
Location: Chennai

PostPosted: Tue Jan 08, 2008 7:56 pm
Reply with quote

Hi,
I need a sort card for the following
Input
Key

Code:

abc
abc
abc
xyz
xyz


Output

Code:

abc 1
abc 2
abc 3
xyz 1
xyz 2


Is it possible with sort
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Jan 08, 2008 8:07 pm
Reply with quote

You can use a DFSORT job like this:

Code:

//STEP1    EXEC PGM=SORT                         
//SYSOUT   DD SYSOUT=*                           
//SORTIN   DD *                                   
ABC                                               
ABC                                               
ABC                                               
XYZ                                               
XYZ   
/*                                           
//SORTOUT  DD SYSOUT=*                           
//SYSIN    DD *               
  SORT FIELDS=COPY                           
  INREC OVERLAY=(5:SEQNUM,1,ZD,RESTART=(1,3))                     
/*                                               
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts Generate random number from range of ... COBOL Programming 3
No new posts Increase the number of columns in the... IBM Tools 3
No new posts Use input file with OMIT rcd keys? DFSORT/ICETOOL 15
Search our Forums:

Back to Top