how to increment a numeric field with an integer



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

how to increment a numeric field with an integer

Postby supriya saraswat » Wed Jul 09, 2008 11:47 am

file1
00101
00104
00180
00189

output should be
file 2
00103
00106
00182
00191

how can i do this by using dfsort
supriya saraswat
 
Posts: 21
Joined: Mon Jul 07, 2008 3:24 pm
Has thanked: 0 time
Been thanked: 0 time

Re: how to increment a numeric field with an integer

Postby Frank Yaeger » Wed Jul 09, 2008 9:39 pm

You can use a DFSORT job like the following to do what you asked for:

//S1    EXEC  PGM=ICEMAN                           
//SYSOUT    DD  SYSOUT=*                           
//SORTIN DD *                                     
00101                                             
00104                                             
00180                                             
00189                                             
/*
//SORTOUT DD SYSOUT=*                             
//SYSIN    DD    *                                 
  OPTION COPY                                     
  INREC OVERLAY=(1,5,ZD,ADD,+2,TO=ZD,LENGTH=5)     
/*
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: how to increment a numeric field with an integer

Postby supriya saraswat » Thu Jul 10, 2008 11:51 am

thanks..
supriya saraswat
 
Posts: 21
Joined: Mon Jul 07, 2008 3:24 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post