converting the null

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
uppalapati2003
Participant
Posts: 70
Joined: Thu Nov 09, 2006 2:14 am

converting the null

Post by uppalapati2003 »

Hi,

how to convert null values into some default value in modify stage

right now i am using like this
the data type of the column is DATE

column name is BEG_DATE

BEG_DATE = handle_null(BEG_DATE,'1800-01-01') i am giving like this

it showing some error

"""" main_program: Error parsing modify adapter: Error in binding: Expected ')', got: "-01"
Expected destination field selector, got: ")"; input: """""
Srini
gnreddy
Participant
Posts: 8
Joined: Wed Jan 30, 2008 11:50 am
Location: Bangalore
Contact:

Re: converting the null

Post by gnreddy »

Hi,

U can do this like the following.

BEG_DATE:DATE=NullToValue(BEG_DATE,'1800-01-01')

i think it works fine.

regards
narayan reddy.g
gangula.narayan reddy
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

One function is for Modify stage, the other is for Transformer stage.

The chapter in Parallel Job Developer's Guide on Modify stage is incorrect in stating that NullToValue() can be used in Modify stage.

Try using double quotes around the default value ("1800-01-01"). What is the default date format for your project/job?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vinayc
Participant
Posts: 12
Joined: Wed Nov 14, 2007 4:38 am

Post by vinayc »

Hi
I am also facing same problem.
I want to do null handling using Modify stage rather than transformer stage.I am using following function.

DEF= Handle_Null (DEF,'AAAA')

DEF is the column name.
But rather than transferring null as AAAA, it is transferring null only.
Can you please give me some solution?
vinayc
Participant
Posts: 12
Joined: Wed Nov 14, 2007 4:38 am

Post by vinayc »

Hi
I am also facing same problem.
I want to do null handling using Modify stage rather than transformer stage.I am using following function.

DEF= Handle_Null (DEF,'AAAA')

DEF is the column name.
But rather than transferring null as AAAA, it is transferring null only.
Can you please give me some solution?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Why do you have a space between the function name and the "(" character?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply