Compare DSLink1.Column1 = DSLink1.Column5

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
karthi_gana
Premium Member
Premium Member
Posts: 729
Joined: Tue Apr 28, 2009 10:49 pm

Compare DSLink1.Column1 = DSLink1.Column5

Post by karthi_gana »

All,

I think there is some limitation to do comparison as below in the transformer stage column derivation.

seqfile ----------> transformer -----------> seqfile
DSLink1 DSLink2

In transformer stage,

If DSLink1.DTLRowCont = DSLink1.TRLRowCnt then 'FOOTER RECORD COUNT IS MATCHING WITH DETAIL SECTION' ELSE 'RECORD COUNT MISMATCH'

If I use the above IF statement in the column derivation, it is showing in the red color.

If I use the same in stage variable, it is working fine.

StageVar = If DSLink1.DTLRowCont = DSLink1.TRLRowCnt then 'FOOTER RECORD COUNT IS MATCHING WITH DETAIL SECTION' ELSE 'RECORD COUNT MISMATCH'

Created a link between StageVar to Transformer column.

I am able to see the proper message. How?

Is it some limitation of column derivation?
Karthik
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

Red can be like a warning. With the derivation as red in the Transformer stage, can you compile it, run it, and still get the correct result? Sometimes that is the case.

I'm not seeing that behavior on 11.3. What version are you on?
Choose a job you love, and you will never have to work a day in your life. - Confucius
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Right click on the red expression and choose "Validate Derivation" from the menu; the expression editor will tell you what it thinks is wrong with the syntax - for example field and link names are case sensitive. Maybe you mis-spelled "Count" as "Cont".
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