Derivation OK, Compiled code not OK

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
SBSA_DW2
Premium Member
Premium Member
Posts: 37
Joined: Fri Jul 25, 2008 1:24 am

Derivation OK, Compiled code not OK

Post by SBSA_DW2 »

Hi guys
I experienced a strange error today, but managed to fix it by excluding the piece of code generating the error.
I am getting source data that I test whether it's a number using the Num
function (removing code not impacting post):
If Num(Trim(linkname.column_1,'"',"A")) = 1 Then
Trim(linkname.column_1,'"',"A") : "000" Else
something other code here : "000"
The code generated then looks as follows:
...previous code...
0041: // evaluate columns (no constraints) for link: LN_01_Left
0042: if ((is_numeric(trimc_string(linkname.column_1 , InterVar0_0 , InterVar0_1)) == 1)) {
0043: LN_01_Left.column_1 = (trimc_string(linkname.column_1 , InterVar0_0 , InterVar0_1) + InterVar0_2);
0044: } else {
0045: LN_01_Left.column_1 = (trimc_string(...more code here...));
0046: }
0047: //;0048: LN_01_Left.fir...more code...
The derivation is validated in the transformer, but when compiling the job there is a message stating there is a unexpected ";" in the code. I went through the code generated and only find the commented ";" is in a strange place, is this the source of the error?

Like I said, after removing the is_numeric function the job compiled. Unfortunately I don't know where to look to compare the code before/after.

Any ideas on the "//;" record in the generated code at first?

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

Post by ArndW »

It is a bit difficult in this case to localize the error since the full code is not there and the cause might be in those parts removed.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Please advise how this issue was resolved.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
SBSA_DW2
Premium Member
Premium Member
Posts: 37
Joined: Fri Jul 25, 2008 1:24 am

Post by SBSA_DW2 »

I changed the code from

Code: Select all

function (removing code not impacting post): 
If Num(Trim(linkname.column_1,'"',"A")) = 1 Then 
Trim(linkname.column_1,'"',"A") : "000" Else 
something other code here : "000" 
To

Code: Select all

Trim(linkname.column_1,'"',"A") : "000"
And handle the outcome after the transformer.
Post Reply