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
supriya saraswat
Posts: 21
Joined: Mon Jul 07, 2008 3:24 pm
Skillset: cics,jcl,db2,cobol,vsam,dfsort/icetool
Referer: manager

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

User avatar
Frank Yaeger
Global moderator
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Skillset: DFSORT, ICETOOL, ICEGENER
Referer: Search
Contact:

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:

Code: Select all

//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

supriya saraswat
Posts: 21
Joined: Mon Jul 07, 2008 3:24 pm
Skillset: cics,jcl,db2,cobol,vsam,dfsort/icetool
Referer: manager

Re: how to increment a numeric field with an integer

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

thanks..


  • Similar Topics
    Replies
    Views
    Last post