Page 1 of 1

Writting NULL to a sequential File

Posted: Fri Sep 10, 2010 4:23 pm
by somu_june
Hi,

I have a parallel job and I'm writting data to sequential file and it had a field sv9 with char(10) data type and in the field properties I mentioned Null value as 'NULLNULLNU' to get rid of the waring
When validating export schema: At field "sv9": "null_field" length (4) must match field's fixed width (10)

but when I see the data in the file for NULL values it has a data NULLNULLNU instead of NULL . Is there a way in parallel job that I can have a value NULL for NULL fields for char(10) lenght column with out a warning message like in server job if you mention in properties NULL it will assign NULL value for all the fields irrespective of their lengths For example for field1 char(1) contains a NULL value it assigns NULL eventhough it is char(1). Is it possible in parallel job or do I need to mention varchar(4) for field1

Thanks,
Somaraju

Posted: Fri Sep 10, 2010 6:12 pm
by ray.wurlod
Only by changing the data type from CHAR to VARCHAR. Every value in a CHAR(10) field - including the null field value - must have precisely ten characters.

Posted: Mon Sep 13, 2010 11:02 pm
by prakashdasika
If you still want to write NULL in to the fixed width file then try 'NULL ' in the CHAR(10) field

Posted: Tue Sep 14, 2010 6:29 am
by rohithmuthyala
Changing the datatype from CHAR to VARCHAR is a good option as the output is a Sequential file.

Posted: Wed Sep 22, 2010 8:38 am
by somu_june
Thanks Every one