Syntax of IsNull in Modify Stage

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
dsxdev
Participant
Posts: 92
Joined: Mon Sep 20, 2004 8:37 am

Syntax of IsNull in Modify Stage

Post by dsxdev »

Hi
Ascential Documentation says Modify Stage is very efficient stage.
I tried using it one of my jobs.
My requirement is to chek in a nullable column for nulls and convert them into a default value.
So I tried the following syntax.

Code: Select all

AGE_OUT=NullToValue(AGE_IN,-1)
But it gives an error saying unidentified conversion/ invalid conversion.

I also tried the function.

Code: Select all

AGE_OUT=IsNull(AGE_IN)
here AGE_OUT is the output column and AGE _IN is the input column.

Can somebody give the syntax for using these function in Modify Stage.

I tried using the syntax listed in the documentation. It did not work.
Happy DataStaging
DECAP
Participant
Posts: 1
Joined: Tue Feb 15, 2005 12:09 pm

Syntax of IsNull is Handle_Null in Modify Stage

Post by DECAP »

Hi,

The syntax to use in Modify Stage is :

Code: Select all

AGE_OUT = handle_null(AGE_IN, -1)
regards
pnchowdary
Participant
Posts: 232
Joined: Sat May 07, 2005 2:49 pm
Location: USA

Post by pnchowdary »

Hi dsxdev,

Try the below syntax

Code: Select all

AGE_OUT:string = NullToValue(AGE_IN,"-1")
Thanks,
Naveen
dsxdev
Participant
Posts: 92
Joined: Mon Sep 20, 2004 8:37 am

Post by dsxdev »

Hi pnchowdary,

I am sure this piece does not work.
I tried it out but in vain.

Code: Select all

AGE_OUT:string = NullToValue(AGE_IN,"-1")

By the way in which pdf talks about these function.
I would appreciate if any one can provide any pointers to these pdf's
Happy DataStaging
Post Reply