Page 1 of 1

Handling spaces in Packed Decimal fields

Posted: Fri Oct 19, 2007 8:07 am
by vrsraju
Hi
I am getting spaces in the packed decimal field. I have to convert to either NULL or Zero when I get spaces in that field. Data Type is PIC 9(7)V9(2) COMP-3. Is there any option which would handle that conversion in CFF stage. If not, is there any other place I can do that conversion.
Thanks and Rgds
vrsraju

Posted: Fri Oct 19, 2007 5:06 pm
by ArndW
Have you tried the default value attribute - since spaces don't equate to a valid value it should use whatever setting you specify for the default value for that column.

Posted: Wed Oct 24, 2007 10:28 am
by vrsraju
Can you please advice me how to specify the default value attribute in the Complex Flat File?
Thanks
vrsraju

Posted: Wed Oct 24, 2007 3:16 pm
by ArndW
In the CFF stage, right-mouse click on the column name and then choose the option "edit row", the rest follows from there.

Posted: Fri Oct 26, 2007 10:58 am
by vrsraju
ArndW wrote:In the CFF stage, right-mouse click on the column name and then choose the option "edit row", the rest follows from there. ...
Thanks for your help. I can see lot of other options. But I didn't find any option to set a default value. Can you please give me the name of the option to set the default value. Thanks a lot for your help.
vrsraju

Posted: Fri Oct 26, 2007 9:11 pm
by ray.wurlod
I don't understand how spaces are even possible in packed decimal representation!

Posted: Sat Oct 27, 2007 1:06 am
by ArndW
Ray - as you rightly point out, spaces cannot be in a packed decimal field.

Posted: Fri Nov 16, 2007 12:14 pm
by landaghaar
I have the same problem and yes those fields have ebcidic 40404040 value in there.

Posted: Fri Nov 16, 2007 12:46 pm
by landaghaar
I just browsed through other posts and found my answer.
If anyone still has this issue, just add a default property to the decimal field and make it default to 0 or 999999999 or whatever you wish.