APT_CombinedOperatorController(3),1: Null string argument.

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
swati1_sinha
Participant
Posts: 4
Joined: Wed Feb 20, 2008 4:57 am
Location: Pune

APT_CombinedOperatorController(3),1: Null string argument.

Post by swati1_sinha »

I am converting a string field to decimal. Null values and " " are taken care of.

The original derivation is like :

if stgFICODOMSUBIND=2 then stringtodecimal(trim(nulltovalue(lnkCIIOut.RE_CGSB_SCR_2,-9999))) else stringtodecimal(trim(nulltovalue(lnkCIIOut.RE_CGSB_SCR_1,-9999)))

I tried with more descriptive derivation like :
if stgFICODOMSUBIND=2 then
if trim(lnkCIIOut.RE_CGSB_SCR_2)=" " then
-9999
else
stringtodecimal(lnkCIIOut.RE_CGSB_SCR_2)
else
if trim(lnkCIIOut.NRE_CGSB_SCR_1)=" " then
-9999
else
stringtodecimal(lnkCIIOut.NRE_CGSB_SCR_1)

But didn't help.
sWaTi
Maveric
Participant
Posts: 388
Joined: Tue Mar 13, 2007 1:28 am

Post by Maveric »

Try this. If the input is black or just a space then you should be comparing the output of the trim() with ""(empty).

Code: Select all

if stgFICODOMSUBIND=2 then
if trim(lnkCIIOut.RE_CGSB_SCR_2)="" Or IsNull(lnkCIIOut.RE_CGSB_SCR_2) then
stringtodecimal("-9999")
else
stringtodecimal(lnkCIIOut.RE_CGSB_SCR_2)
else
if trim(lnkCIIOut.NRE_CGSB_SCR_1)="" Or IsNull(lnkCIIOut.RE_CGSB_SCR_1) then
stringtodecimal("-9999")
else
stringtodecimal(lnkCIIOut.NRE_CGSB_SCR_1)
swati1_sinha
Participant
Posts: 4
Joined: Wed Feb 20, 2008 4:57 am
Location: Pune

Post by swati1_sinha »

Hi!
Thnks for the input. actually error was in other field derivation :
derivation was like :

if num(trim(nulltoempty(column_name)))=0 .
i removed the trim..... warning vanished!


Maveric wrote:Try this. If the input is black or just a space then you should be comparing the output of the trim() with ""(empty).

Code: Select all

if stgFICODOMSUBIND=2 then
if trim(lnkCIIOut.RE_CGSB_SCR_2)="" Or IsNull(lnkCIIOut.RE_CGSB_SCR_2) then
stringtodecimal("-9999")
else
stringtodecimal(lnkCIIOut.RE_CGSB_SCR_2)
else
if trim(lnkCIIOut.NRE_CGSB_SCR_1)="" Or IsNull(lnkCIIOut.RE_CGSB_SCR_1) then
stringtodecimal("-9999")
else
stringtodecimal(lnkCIIOut.NRE_CGSB_SCR_1)
sWaTi
Post Reply