Stage Variable Problem

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
somu_june
Premium Member
Premium Member
Posts: 439
Joined: Wed Sep 14, 2005 9:28 am
Location: 36p,reading road

Stage Variable Problem

Post by somu_june »

Hi,

I have a job which has 4 stage variables svYear, svMonth, svDate and sv1 = svYear:'-':svMonth:'-':svDate

svYear Varchar(4)
svMonth varchar(2)
svDate varchar(2)
sv1 varchar(10)

If the values for svYear is 2011, svMonth = 02 and svDate = 21 it is working fine and I'm getting output as 2011-02-21

but for the below data
svYear = 2011, svMonth = 02 and svDate = 01

the stage variable is not giving me the right output and the output is
2011 -02-0 and I'm missing 1 in the date field and also Datastage is placing a space after year if I have a date like 01, 02 ,03 etc. I noticed this using a peek stage.

Does any one know why this is happening.

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

Post by ray.wurlod »

Where is svYear getting its value from? (You might also ask yourself how a VarChar(4) could have five characters.)

Double check your expression and stage variable data types.
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