View previous topic :: View next topic
|
Author |
Message |
Mukesh Pandey
Active User
Joined: 11 Nov 2008 Posts: 143 Location: India
|
|
|
|
Hi All,
I need help as mentioned below:
Input file
Location Company Year
001 abc 2008
002 xyz 2009
Output file
Location Company Year
001 abc 2009
002 xyz 2010
Assuming that the file has one thousand records ,please suggest how can we edit the records using sort utility. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
This has been asked and answered before
Click HERE to see what you might have found yourself had you bothered to search. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Mukesh,
Assuming you want to add 1 to the field in positions 23-26, you can use a DFSORT job like the following:
Code: |
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
001 abc 2008
002 xyz 2009
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC OVERLAY=(23:23,4,ZD,ADD,+1,EDIT=(TTTT))
/*
|
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000080 |
|
Back to top |
|
|
Mukesh Pandey
Active User
Joined: 11 Nov 2008 Posts: 143 Location: India
|
|
|
|
Thanks Expat and Frank. |
|
Back to top |
|
|
|