View previous topic :: View next topic
|
Author |
Message |
swapnadeep.ganguly
Active User
Joined: 21 Mar 2007 Posts: 203 Location: India
|
|
|
|
Hi All,
I want to add a Unique Row Index (Line number is the best Unique Row Index to me). Is there any method in DFSORT my means of which, we can easily add the same to my record.
Let us assume my input as
I want the Output as:
Code: |
AAA00001
BBB00002
CCC00003
|
Thanks in advance for your help. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
What is the RECFM and LRECL of the input dataset.
How many records do you estimate will be in the file.
The code below works for me - adding a space and a 5 byte sequence number to the end of a 60 byte FB record
Code: |
OPTION COPY
OUTREC BUILD=(1,60,1X,SEQNUM,5,ZD) |
|
|
Back to top |
|
|
swapnadeep.ganguly
Active User
Joined: 21 Mar 2007 Posts: 203 Location: India
|
|
|
|
The RECFM is FB and the LRECL is 82.
So, the code that should work for me (without the space) should be:
Code: |
OPTION COPY
OUTREC BUILD=(1,82,SEQNUM,10,ZD)
|
Please correct me if I have gone wrong in my understading.
Thanks for your help. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
That will work, but you can do it more simply with DFSORT's OVERLAY function like this:
Code: |
OPTION COPY
OUTREC OVERLAY=(83:SEQNUM,10,ZD)
|
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 |
|
|
swapnadeep.ganguly
Active User
Joined: 21 Mar 2007 Posts: 203 Location: India
|
|
|
|
Thank you Frank for providing this Tutorial..
Thank you all for providing the quick responses as the solutions provided by you all worked for me... |
|
Back to top |
|
|
|