Posted: Tue Feb 20, 2007 5:01 am Post subject: Character to Zoned Decimal in SORT
Hi,
Is it possible to convert characters to Zoned Decimal in SORT or ICETOOL.
I am having a requirement where the LRECL is 100 and the content from 11 to 20 is a combinations of spaces and numbers. I need to sort based on 11 to 20 based on ZD.
For example:
12355BBBBB ---> Need to considered as 12355
BBBBBBBB1 ---> Need to considered as 1
Like so.. _________________ RAJA MOHAMED
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Tue Feb 20, 2007 11:07 am Post subject:
Note that if you just want to SORT on these type of values, you don't have to convert them to ZD to do that. You can just use DFSORT's UFF format in the SORT statement directly:
Code:
SORT FIELDS=(11,10,UFF,A)
Of course, you can convert the values if you want to, but this would be an easier way to do it:
Code:
INREC OVERLAY=(11:11,10,UFF,TO=ZD,LENGTH=10)
_________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum