Null Handling

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

edward_m
Charter Member
Charter Member
Posts: 257
Joined: Fri Jun 24, 2005 9:34 am
Location: Philadelphia,PA

Null Handling

Post by edward_m »

Hi All,

I am trying to load data into sequential file however i am getting following error when the source column coming as null.

When validating export schema: At field "LAST_UPDATE_DATE": "null_field" length (0) must match field's fixed width (19)

Seq file definitions..

column LAST_UPDATE_DATE
sqltype timestamp 38
nullable yes
description none

file format
delimiter string \31
null field value ''
quote none

Could anbody throw some light on this..

Thanks in advance..
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Search on "null_field" length (0) must match field's fixed width. The same sarch retrieved 17 results. One of the them ought to help you.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

Null Field Value property of the "LAST_UPDATE_DATE" must have the same length as the fixed-width field length. Go to the column properties and add 19 spaces for the field.
I haven't failed, I've found 10,000 ways that don't work.
Thomas Alva Edison(1847-1931)
edward_m
Charter Member
Charter Member
Posts: 257
Joined: Fri Jun 24, 2005 9:34 am
Location: Philadelphia,PA

Post by edward_m »

us1aslam1us wrote:Null Field Value property of the "LAST_UPDATE_DATE" must have the same length as the fixed-width field length. Go to the column properties and add 19 spaces for the field.
I applied condition in tranformer stage if IsNull(LAST_UPDATE_DATE) Then '
' Else LAST_UPDATE_DATE, but this condition didn't work.

Please let me know where can i find column properties to define 19 spaces..

Thanks in advance..
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Edward, the transform action doesn't affect this message. You need to right-mouse click on the column in the sequential file stage, then do and "edit row" and either explicitly set or remove the attribute there.
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

in the sartget sequential file stage property, you should define the "null field value" may be '' or ' ', or you can set for individual fields too.
better define as file property, less effort.
edward_m
Charter Member
Charter Member
Posts: 257
Joined: Fri Jun 24, 2005 9:34 am
Location: Philadelphia,PA

Post by edward_m »

I modified as you directed still i amgetting the same error as before..
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Try putting 19 "*" characters in as the Null Field Value property.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
edward_m
Charter Member
Charter Member
Posts: 257
Joined: Fri Jun 24, 2005 9:34 am
Location: Philadelphia,PA

Post by edward_m »

Thanks..i have 97 nullable columns.So its hard for me to define '*' to each and every column based on their length.
Is there any alternative solution ??

Thanks in Advance..
sanjay
Premium Member
Premium Member
Posts: 203
Joined: Fri Apr 23, 2004 2:22 am

Post by sanjay »

edward

in general property of sequential file stage you can set that instead of each column.


Sanjay

edward_m wrote:Thanks..i have 97 nullable columns.So its hard for me to define '*' to each and every column based on their length.
Is there any alternative solution ??

Thanks in Advance..
edward_m
Charter Member
Charter Member
Posts: 257
Joined: Fri Jun 24, 2005 9:34 am
Location: Philadelphia,PA

Post by edward_m »

sanjay wrote:
in general property of sequential file stage you can set that instead of each column.
Thanks for your response Sanjay.

Could you please let me know where do we set up??
In sequential file i defined the following properties for under Format
Field defualts:
Delimeter = comma
Null Field value =''
Quote = none

Please advise..
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

edward_m wrote:Thanks..i have 97 nullable columns.So its hard for me to define '*' to each and every column based on their length.
Is there any alternative solution ??

Thanks in Advance..
No.

It's not hard. It's just tedious.
Last edited by ray.wurlod on Thu Jul 05, 2007 11:41 am, edited 1 time in total.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
edward_m
Charter Member
Charter Member
Posts: 257
Joined: Fri Jun 24, 2005 9:34 am
Location: Philadelphia,PA

Post by edward_m »

Ray,

I don't see full content of your message because i am not premium member..could you please disable this as premium content..

Thanks...
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There's nothing really premium about the content, which is why I disabled the Premium flag. Ordinarily I would not do so.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
edward_m
Charter Member
Charter Member
Posts: 257
Joined: Fri Jun 24, 2005 9:34 am
Location: Philadelphia,PA

Post by edward_m »

Thanks you very much Ray..
Post Reply