Handling spaces in Packed Decimal fields

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
vrsraju
Participant
Posts: 10
Joined: Mon Dec 08, 2003 9:48 pm

Handling spaces in Packed Decimal fields

Post 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
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
vrsraju
Participant
Posts: 10
Joined: Mon Dec 08, 2003 9:48 pm

Post by vrsraju »

Can you please advice me how to specify the default value attribute in the Complex Flat File?
Thanks
vrsraju
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
vrsraju
Participant
Posts: 10
Joined: Mon Dec 08, 2003 9:48 pm

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I don't understand how spaces are even possible in packed decimal representation!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Ray - as you rightly point out, spaces cannot be in a packed decimal field.
landaghaar
Participant
Posts: 38
Joined: Wed Sep 19, 2007 10:11 am
Location: Canada

Post by landaghaar »

I have the same problem and yes those fields have ebcidic 40404040 value in there.
landaghaar
Participant
Posts: 38
Joined: Wed Sep 19, 2007 10:11 am
Location: Canada

Post 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.
Post Reply