Page 1 of 1

Sequential file in PX

Posted: Sun Jan 13, 2008 9:23 pm
by just4u_sharath
I have a record in which some of the columns are nulls. When i export this record to a sequential file the message is "exporting nullable fields without null handling properties". Then i used a xformer and handled all nulls and in the sequential i left the nullable column YES. Still the error is same. if i put nullable column NO, it works fine.

Does this mean i cannot put YES in the nullablecolumn and export a null field? Should i always need to handle nulls. Cannot i export nulls as it is to sequential file.Please help me

Posted: Sun Jan 13, 2008 9:40 pm
by Minhajuddin
In Parallel jobs you need to handle NULLs explicitly. This doesn't mean that you should do null handling only in the Transformer. Moreover you don't have to do the Null handling on a field if you don't transform that field or if it is not being used in any stage variables.

Now you are having this problem because datastage doesn't know how to write NULLs to the sequential file. This can be solved by setting the "Null Value" property to an empty string "" for instance, Which tells datastage to write empty strings whenever it encounters a NULL. You can set this property to the value you want in the output whenever a NULL is encountered.

Posted: Mon Jan 14, 2008 12:08 am
by ray.wurlod
You need a null handing property - for example Null Field Value or Null Field Length - which informs DataStage what to write into the text file to replace a NULL. Text files don't really have data types - they just have text - so there can be no concept of NULL in a text file, just a pre-defined representation of NULL - what DataStage terms an "in-band null", one that's a legal value for the domain but which is defined as representing null.

Sequential file px

Posted: Mon Jan 14, 2008 8:02 pm
by just4u_sharath
Minhajuddin wrote:In Parallel jobs you need to handle NULLs explicitly. This doesn't mean that you should do null handling only in the Transformer. Moreover you don't have to do the Null handling on a field if you don't transform that field or if it is not being used in any stage variables.

Now you are having this problem because datastage doesn't know how to write NULLs to the sequential file. This can be solved by setting the "Null Value" property to an empty string "" for instance, Which tells datastage to write empty strings whenever it encounters a NULL. You can set this property to the value you want in the output whenever a NULL is encountered.
Where can i find the null value property in sequential file. i have checked all the properties. i didnt find any null value property

Posted: Tue Jan 15, 2008 3:25 am
by Minhajuddin
You can find it in the format tab. It's in the same category as the Delimiter.

Posted: Tue Jan 15, 2008 9:07 am
by Abburi
Minhajuddin wrote:You can find it in the format tab. It's in the same category as the Delimiter.
You can find it in the Format Tab-->Field defaults-->Null field value (need to select)