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
The code generated then looks as follows: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 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?...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...
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!