file1
00101
00104
00180
00189
output should be
file 2
00103
00106
00182
00191
how can i do this by using dfsort
how to increment a numeric field with an integer
-
- Posts: 21
- Joined: Mon Jul 07, 2008 3:24 pm
- Skillset: cics,jcl,db2,cobol,vsam,dfsort/icetool
- Referer: manager
- 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
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
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
-
- Posts: 21
- Joined: Mon Jul 07, 2008 3:24 pm
- Skillset: cics,jcl,db2,cobol,vsam,dfsort/icetool
- Referer: manager
-
- Similar Topics
- Replies
- Views
- Last post
-
- 1
- 1809
-
by sergeyken
View the latest post
Fri Mar 26, 2021 11:59 pm
-
-
Retain non numeric character in IFTHEN - BUILD
by Shambu » Wed Dec 01, 2021 5:00 pm » in Syncsort/Synctool - 1
- 1981
-
by sergeyken
View the latest post
Sat Dec 04, 2021 2:28 pm
-
-
- 2
- 1606
-
by sergeyken
View the latest post
Sun Jan 26, 2025 3:07 am
-
-
sort card to add zeros to varying alphanumeric field.
by longfall » Thu Mar 09, 2023 12:03 am » in DFSORT/ICETOOL/ICEGENER - 1
- 1839
-
by sergeyken
View the latest post
Thu Mar 09, 2023 2:04 am
-