Joined: 12 May 2006 Posts: 41 Topics: 16 Location: Mumbai
Posted: Wed Sep 06, 2006 11:40 pm Post subject: Un-Packing the PD field based on the Indicator
Hi,
I have a Dataset with multiple records with an Indicator based on which I have to Un-pack the PD field. Based on the indicator, the starting and ending position of the PD field will be keep on changing.
Ex: Lest's say that the first byte of each record carries an Indicator.
If the indicator is '1', the PD field starting position may be 10 and ending position 19, if the ind is '2' the PD field starting position may be 21 and ending position 29 ... etc.
How can it be done using DF Sort/Syncsort.
It's urgent.
thanks in advance _________________ Thanks,
-Srini
If the I/P rec positions 32,33 contains the indicator '08' I have to convert the PD field 1,8 to BI and shud write the same to an output file. _________________ Thanks,
-Srini
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Thu Sep 07, 2006 7:15 am Post subject:
srini_igsi,
Your job is failing because your input does not have valid Packed decimal fields. If you populate a PD field with hex zeros, it becomes a PD value with an invalid sign (0) which would explain the S0C7.
You can run VERIFY on the PD fields to see which records have invalid data. Check this DFSORT/ICETOOL link which explains in detail about the VERIFY operator
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Thu Sep 07, 2006 11:41 am Post subject:
Quote:
If you populate a PD field with hex zeros, it becomes a PD value with an invalid sign (0) which would explain the S0C7.
Actually, you won't get an S0C7 with DFSORT for all binary zeros (X'0000000000000000'). DFSORT treats a 0, 2, 4, 6, 8, A, C, E and F in the sign bit as a positive sign, and 1, 3, 5, 7, 9, B and D as a negative sign. You'd need a bad digit (not 0-9) to get an S0C7 in this situation.
VERIFY will identify values with bad digits. _________________ 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