Handling Nulls in PX sequential Files

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

Post Reply
fridge
Premium Member
Premium Member
Posts: 136
Joined: Sat Jan 10, 2004 8:51 am

Handling Nulls in PX sequential Files

Post by fridge »

Hi , I know this subject has been posted before but I still am not getting anywhere so am posting some specifics of my problem so that I can avail myself of your monumental experience and sheer brilliance (you can tell I need help)

Basically I am trying to read a csv(ish) file using PX the format is as follows

<Integer>,<Date1>,<Date2>,<Date3>,<Date4)

Where the date fields can be null, but (and here is the gotcha) the first 3 date fields are padded to 8 space chars if null where as the last one is terminated with a <CR> if null so the data will look something like this

Code: Select all

     0,20040216,20040216,        ,<CR>
     6,19971002,20040815,20000623,20040827
     9,20010105,20030518,        ,<CR>
   15,19990412,20040831,20001017,20040826
I've tried several combinations of field level settings w.r.t. the nullable date fields , namely dates1-3 having null field value='<SPC*8>' and the date4 null field value = /x0a but keep getting

Code: Select all

IBStatus,0: Input buffer overrun at field "DATE4", at offset: 36
Warnings

What is the best way to specify this as its doing my head in

Thanks in advance

Fridge
vbeeram
Participant
Posts: 63
Joined: Fri Apr 09, 2004 9:40 pm
Contact:

Null vals in the source

Post by vbeeram »

Try in this way:
------------------------
Declare Date fiields as Varchar type,
Then go to columns tab click on the serial no tab of column,there u have three categories 1)Field lavel2)String Type 3)Nullable
under Nullable -----set Null Field value=Null
under String type----set Default=0 (some value)

In this way you can handle Null values.
(Repeat same procedure for other 2 date fields)

Regards
Thiru
fridge
Premium Member
Premium Member
Posts: 136
Joined: Sat Jan 10, 2004 8:51 am

Post by fridge »

Thanks for that, after much playing (not what I told my boss) had come to same conclusion.

Have now got another prob with lookup stage but wont bore u with it as I think I am just being dense (expect post approx 14:00 tomorrow :-) )

Thanks again

Fridge
Post Reply