APT_CombinedOperatorController,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

rgr
Participant
Posts: 13
Joined: Wed Apr 29, 2009 6:13 pm

APT_CombinedOperatorController,1: Null string argument.

Post by rgr »

Hi,
Iam using following exp IsNull(column_name) Then '' Else If Num(column_name)) Then column_name) Else 'aaa'
the source data type is char. The above expression is working fine in server but in parallel Iam getting APT_CombinedOperatorController,1: Null string argument.warning, even I tried Using NVL function in source query.
It would be helpful some one provide resolution.

Thanks In Adavance

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

Post by ray.wurlod »

Start by disabling operator combination so you can see which stage is actually generating the error. It may not be where you think.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
rgr
Participant
Posts: 13
Joined: Wed Apr 29, 2009 6:13 pm

Post by rgr »

ray.wurlod wrote:Start by disabling operator combination so you can see which stage is actually generating the error. It may not be where you think. ...
Thanks Ray,
I have disabled operation cobination it is showing in the same transformer
where Iam using above exp.

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

Post by ArndW »

If you replace the derivation with a simple constant value, does the job run without that warning? The expression itself does not look like it would cause that error message (I assume you didn't cut-and-paste as there is a sytactical error with parenthesis in the statement).
rgr
Participant
Posts: 13
Joined: Wed Apr 29, 2009 6:13 pm

Post by rgr »

Ray,
still I am getting same warning
Thanks,
RGR
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Is your expression missing If at its beginning?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
rgr
Participant
Posts: 13
Joined: Wed Apr 29, 2009 6:13 pm

Post by rgr »

ray.wurlod wrote:Is your expression missing If at its beginning? ...
No

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

Post by ArndW »

If you are still getting the warning after having removed the statement then I would suggest you look elsewhere for the cause.
rcanaran
Premium Member
Premium Member
Posts: 64
Joined: Wed Jun 14, 2006 3:51 pm
Location: CANADA

Post by rcanaran »

I am having a similar problem.

Stage Variable Defintion populated with :
If IsNull(linkname.VARIABLE_NAME)
Then "000"
Else If Len(Trim(linkname.VARIABLE_NAME)) <> 3
Then "000"
Else If (Num(linkname.VARIABLE_NAME))
Then linkname.VARIABLE_NAME
Else "000"

If the incoming variable string is not a 3-digit number, then the sv should contain string "000" else it should contain the value from the incoming variable.

It appears that the NUM function is evaluating the variable even though the IF/ELse structure should have bypassed this. Perhaps DS parallel evaluates all the nested conditions to T/F and then processes the structure acording to the T/F results, isntead of only processing the variables/functions it needs to.

I forced this by having another sv prior to this which evaluated the null value to a string containing '' (an EMPTY string; I guess this differs from a NULL string). The (now 2nd, but really the original) sv that I was working with origianlly now uses the 1st sv instead of the incoming variable.

This solved the situation for me, but I consider this a workaround. I think the real solution would involve DS parallel evaluating only what it needs to and doing this in a single sv.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

"(an EMPTY string; I guess this differs from a NULL string)"

It most definitely does. Differ, that is.
-craig

"You can never have too many knives" -- Logan Nine Fingers
rcanaran
Premium Member
Premium Member
Posts: 64
Joined: Wed Jun 14, 2006 3:51 pm
Location: CANADA

Post by rcanaran »

Thanks Craig. And I love the tag line.
But any insight into how DS is processing the derivation?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

To the best of my knowledge, it basically goes "left to right" and stops evaluating as soon as it can. Your problem may have strictly been a null versus empty string issue but I'm going to have to defer that judgement to those that have a more intimate knowledge of How Things Work, like Ray or Arnd.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can inspect the generated C++ code in the RT_SCnnn directory, where nnn is the job number.

In theory it's left to right, as Craig believes, but the optimizer may make "decisions" that change that. Inspecting the generated code is the only way you can be sure.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
slosa
Participant
Posts: 4
Joined: Tue May 03, 2005 7:10 am

Post by slosa »

I seen this before, i found out that this behaviour occurs only if
Last edited by slosa on Sat Aug 22, 2009 2:57 pm, edited 1 time in total.
slosa
Participant
Posts: 4
Joined: Tue May 03, 2005 7:10 am

Post by slosa »

sorry, forget my last post

It seems to be related to the type of the input coumn. If I set it to Vachar (unbounded) the warning disapears - if i use a bound (VarChar[10]) i see this error.
Post Reply