stagevariable

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
basu.ds
Participant
Posts: 118
Joined: Tue Feb 06, 2007 12:59 am
Location: Bangalore

stagevariable

Post by basu.ds »

Hi

I have written on stagevariable but it is giving me wrong result can any help me on this

mystagevariable if trans.empno=mast.empno then 1 else 0

both columns are varchar columns
trans.empno=00000802 (value coming from hash file)
mast.empno=802 (value coming from oracle stage)
but data stage shows both are same i am wondering how?

Thanks in advance
srinagesh
Participant
Posts: 125
Joined: Mon Jul 25, 2005 7:03 am

Post by srinagesh »

Try something like

Code: Select all


if "*" : trans.empno = "*" : mast.empno then 1 else 0 

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

Post by ray.wurlod »

As I already answered in one of your other posts, use the Compare() function if you need to force a string comparison. Syntax of the Compare() function can be had from the DataStage BASIC manual or from the on-line help.

Code: Select all

Compare(mast.empno, trans.empno, "L")
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