Handle Null for fixed width data type having width >= 100
Posted: Tue Aug 02, 2005 3:21 pm
Hello everyone,
I want to find a solution as to how i can define a NULL for fixed width data type like char (10), decimal(10) date(10) in SEQUENTIAL File Stage in PX, while exporting data to a physical file.
* i have nulls in my data. data defn is -> ITEM_DESC CHAR (100)
i know if the width is 10, i can achieve this by doing something like below, and it works absolutely fine.
1. Set Nullable = Y
2. Set Null field value (in Parallel / Nullable settings) to ' ' (/* 10 spaces */)
Now for a 10 width character field this will work fine.
But my problem is that i have a 100 byte (/character) description field describing about an item.
It is highly impossible for me to type ' ... spaces 100 times '
Can any one suggest something else.
One more constraint. i dont not want to use a Transformer because just using a Transformer for doing something like IsNull (...) and then handling it using a function like -> ... Space(100) would cost me.
Also i do not want to use Modify stage.
What i would like info would something on the lines how i can use 'ACTUAL FIELD LENGTH' and 'NULL FIELD LENGTH'
i tried setting attribute ACTUAL FIELD LENGTH =100, and FILL CHAR = Space, but it complains saying it should be used with null_field length
exact message : Seq_Desc: Error when checking operator: At field "ITEM_DESC": "actual_length" can only be used with "null_length"
So i tried using null-field length = 100.
Again it gave an FATAL error saying :
Seq_Desc: Error when checking operator: At field "ITEM_DESC": "null_length" may only be used in conjunction with prefix length or link length.
ANY SUGGESTIONS why / what is happening ?
I tried to be as detailed and elaborative as possible..
thanks all for your valuable time.
warm regards,
Kash.
I want to find a solution as to how i can define a NULL for fixed width data type like char (10), decimal(10) date(10) in SEQUENTIAL File Stage in PX, while exporting data to a physical file.
* i have nulls in my data. data defn is -> ITEM_DESC CHAR (100)
i know if the width is 10, i can achieve this by doing something like below, and it works absolutely fine.
1. Set Nullable = Y
2. Set Null field value (in Parallel / Nullable settings) to ' ' (/* 10 spaces */)
Now for a 10 width character field this will work fine.
But my problem is that i have a 100 byte (/character) description field describing about an item.
It is highly impossible for me to type ' ... spaces 100 times '
Can any one suggest something else.
One more constraint. i dont not want to use a Transformer because just using a Transformer for doing something like IsNull (...) and then handling it using a function like -> ... Space(100) would cost me.
Also i do not want to use Modify stage.
What i would like info would something on the lines how i can use 'ACTUAL FIELD LENGTH' and 'NULL FIELD LENGTH'
i tried setting attribute ACTUAL FIELD LENGTH =100, and FILL CHAR = Space, but it complains saying it should be used with null_field length
exact message : Seq_Desc: Error when checking operator: At field "ITEM_DESC": "actual_length" can only be used with "null_length"
So i tried using null-field length = 100.
Again it gave an FATAL error saying :
Seq_Desc: Error when checking operator: At field "ITEM_DESC": "null_length" may only be used in conjunction with prefix length or link length.
ANY SUGGESTIONS why / what is happening ?
I tried to be as detailed and elaborative as possible..
thanks all for your valuable time.
warm regards,
Kash.