Page 1 of 1

PxCFF Stage - how to set null default values for decimals

Posted: Wed Jul 22, 2009 1:53 am
by Alethesnake
Hi All,
I have se following issue.
I have to read an EBCDIC Binary file and I use a PxCFF stage. Actually I have a decimal field that could be empty (Low Value in host). If a low value is found in a decimal field the default value set in:

Stage properties - Stage - Record Options - Default Values - Decimal

is used. I'd like to set this default value to "null", is it possible? It seems that the box accepts only numbers.. Any help is apreciated.

Thanks,

Ale.

PS: I can also make the host field contains a different value for the field that the low value.

Posted: Wed Jul 22, 2009 2:31 am
by ArndW
Why not set it specifically for the column. right-mouse-click on the column name and "edit row" to get to where you can specify the column specific handling of default values.

Posted: Wed Jul 22, 2009 7:26 am
by Alethesnake
Thanks for your suggestion ArndW, I didn't see it :-)

Do you know how can I represent the null value?

Thanks a lot.

Ale.

Posted: Wed Jul 22, 2009 3:43 pm
by newtier
In the "Edit Row" for that column, under Properties | Nullable, add the Available properties to add: Null Field Value.

Set the value to whatever that is the "exact length" as specified in the Length field. For instance, if Length=7, Scale = 2, set the value to 000000.00 (9 bytes).

If you don't set it to the exact length you will still get a warning like the following:

Sequential_File_1: When checking operator: When validating export schema: At field "DEC_NULL": "null_field" length (3) must match field's fixed width (9) [impexp/group_comp.C:4565]

Posted: Thu Jul 23, 2009 2:01 am
by Alethesnake
newtier wrote:In the "Edit Row" for that column, under Properties | Nullable, add the Available properties to add: Null Field Value.

Set the value to whatever that is the "exact length" as specified in the Length field. For instance, if Length=7, Scale = 2, set the value to 000000.00 (9 bytes).

If you don't set it to the exact length you will still get a warning like the following:

Sequential_File_1: When checking operator: When validating export schema: At field "DEC_NULL": "null_field" length (3) must match field's fixed width (9) [impexp/group_comp.C:4565]
Hi newtier,
Thanks for your reply. I tried to do it with the sequential file stage and it runs well.
However my needs are to read from a PxCFF stage and write its content to a dataset.
The PxCFF stage does not have the mentioned property, the only way I found is to set a default value to substitute an unreadable field (a field with a low value in example), but I am not being able to set a "null" default value.
I tried \0, \000, etc but no one runs well (I get an error in viewing data: value not admitted for a decimal field).

Any idea?