View previous topic :: View next topic
|
Author |
Message |
malayajena
New User
Joined: 08 Jul 2006 Posts: 28 Location: Singapore
|
|
|
|
Dear All
I have one requirement where i need first few bytes of a packed formatted data field for all of records.
Ex:
Brand Name - S9(7) comp-3( value AAAAAAA)
Product ID- S9(17) comp-3( value 12300000000000000)
The above data should show in my output as
AAAAAAA 123.
I tried doing:
OUTREC FIELDS=(1,4,PD,ZD,X,5,3,PD,ZD)
BUT IT GIVES AAAAAAA 01230
Please let me know how can this be achieved in SORT and let me know if any further info is required. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Quote: |
Brand Name - S9(7) comp-3( value AAAAAAA) |
No comment! |
|
Back to top |
|
|
malayajena
New User
Joined: 08 Jul 2006 Posts: 28 Location: Singapore
|
|
|
|
That was a horrible mistake in a hurry - changing it to
Account No- S9(7) comp-3 (1111111)
Product Id- S9(17) comp-3.(12300000000000000)
should appear- 1111111 123
Let me know if anything is required.Thanks. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You can use this DFSORT OUTREC statement to do what you asked for:
Code: |
OUTREC FIELDS=(1,4,PD,ZD,X,5,2,PD,EDIT=(TTT))
|
|
|
Back to top |
|
|
malayajena
New User
Joined: 08 Jul 2006 Posts: 28 Location: Singapore
|
|
|
|
Thanks Frank. You are always the last person to close it:). |
|
Back to top |
|
|
|