Transformer Complilation error

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
sshettar
Premium Member
Premium Member
Posts: 264
Joined: Thu Nov 30, 2006 10:37 am

Transformer Complilation error

Post by sshettar »

Hi All,

I have this job where i am trying to capture only the error records in a file . i have given all the conditions to capture the error in the contraints of the trasnformer.
But i'm getting the compilation error which says
Output from transformer compilation follows:

##I IIS-DSEE-TFCN-00001 18:30:10(000) <main_program>
IBM WebSphere DataStage Enterprise Edition 8.0.1.4665
Copyright (c) 2001, 2005-2007 IBM Corporation. All rights reserved



##I IIS-DSEE-TUTL-00031 18:30:10(001) <main_program> The open files limit is 100; raising to 65536.
##I IIS-DSEE-TOSH-00002 18:30:11(000) <main_program> orchgeneral: loaded
##I IIS-DSEE-TOSH-00002 18:30:11(001) <main_program> orchsort: loaded
##I IIS-DSEE-TOSH-00002 18:30:11(002) <main_program> orchstats: loaded
##W IIS-DSEE-TOSH-00049 18:30:11(005) <main_program> Parameter specified but not used in flow: DSPXWorkingDir (TESTJOBDQ.Transformer_3)

*** Internal Generated Transformer Code follows:
0001: //
0002: // Generated file to implement the V2S3_TESTJOBDQ_Transformer_3 transform operator.
0003: //
0004:
0005: // define our input/output link names
0006: inputname 0 DSLink2;
0007: outputname 0 DSLink9;
0008:
0009: initialize {
0010: // define our row rejected variable
0011: int8 RowRejected0;
0012:
0013: // define our null set variable
0014: int8 NullSetVar0;
0015:
0016: // declare our intermediate variables for this section
0017: decimal InterVar0_0;
0018: decimal InterVar0_1;
0019:
0020: // initialise constant values which require conversion
0021: InterVar0_0 = 10202;
0022: InterVar0_1 = 000000;
0023: }
0024:
0025: mainloop {
0026: // initialise our row rejected variable
0027: RowRejected0 = 1;
0028:
0029: // evaluate constraint and columns for link: DSLink9
0030: if (null(trimc_string(DSLink2.JC_CNCT_CUSTOMER_NO)))
0031: {
0032: DSLink9.ERROR_KEY = DSLink2.JC_CNCT_NO;
0033: DSLink9.ERROR_VALUE = DSLink2.JC_CNCT_CUSTOMER_NO;
0034: if (null(trimc_string(DSLink2.JC_CNCT_CUSTOMER_NO))) {
0035: DSLink9.ERROR_CD1 = InterVar0_0;
0036: } else {
0037: DSLink9.ERROR_CD1 = InterVar0_1;
0038: }
0039: //;
0040: writerecord 0;
0041: RowRejected0 = 0;
0042: }
0043: }
0044:
0045: finish {
0046: }
0047:
*** End of Internal Generated Transformer Code


I ahve lot of constrainsts , i tried giving just one by one and tried compiling . for the first two times with just 2 constraints it compiled successfully but later again it started giving me the same error.
What should i do to get rid of this error

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

Post by ray.wurlod »

I don't see any error (event starting with ##E).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sshettar
Premium Member
Premium Member
Posts: 264
Joined: Thu Nov 30, 2006 10:37 am

Post by sshettar »

though there is no error the job is not compiling
could you please help me resolve this issue?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Is this the first time you are attempting to compile a PX job with a Transformer stage in it? Or you've done that before and there's something wrong with this particular job?
-craig

"You can never have too many knives" -- Logan Nine Fingers
sshettar
Premium Member
Premium Member
Posts: 264
Joined: Thu Nov 30, 2006 10:37 am

Post by sshettar »

i have used the transformer stage before in other jobs.
I have observed that , in one of the condition i had given , i was checking for the field being nullable in the if condition ( this is in the constrainsts of one of the links from the transformer) when i removed just that condition alone the job is compiling successfully. Now how do i go about checking for nullablity in the transformer?

i used the IsNull function, but looks like its giving a problem .
Any help on this would be highly appreciated.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Show us what you did (the actual expression, and the source and target data types) when you were handling null.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Kryt0n
Participant
Posts: 584
Joined: Wed Jun 22, 2005 7:28 pm

Post by Kryt0n »

You say in the constraints, did you have

Code: Select all

If IsNull(<input>) --- wrong
or just

Code: Select all

IsNull(<input>) --- correct
sshettar
Premium Member
Premium Member
Posts: 264
Joined: Thu Nov 30, 2006 10:37 am

Post by sshettar »

the expression i gave for null checking is as follows

(IsNull(TRIM(DSLink2.JC_CNCT_CUSTOMER_NO)))

where as the datatype for the element JC_CNCT_CUSTOMER_NO is varchar(6)
sshettar
Premium Member
Premium Member
Posts: 264
Joined: Thu Nov 30, 2006 10:37 am

Post by sshettar »

to add to it i do the null check in the constrainst first so as to bucket all the records with the JC_CNCT_CUSTOMER_NO as null as well as to set an indicator if the condition is true in the column derivation
the datatype for JC_CNCT_CUSTOMER_NO is varchar(6)
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Trim(NULL) is probably not supported. Apply the IsNull() function without the Trim() function. If the string can be trimmed, it is not null.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply