share string comparison

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
wenfei.chen
Participant
Posts: 15
Joined: Mon Mar 20, 2006 2:03 pm

share string comparison

Post by wenfei.chen »

I wrote a function which can extract number out from a .ini file, it will return string number like "25". My server job will call this function and assign the output value to a stage variable: stagevar.

My job is to fileter out the records that column DUE is greater than that stagevar. At the begining, I just used DUE > stagevar in constraint, and it didn't work. After one day research, I found out that stagevar is not "25", but ""25"", so I have to use trim(stagevar,char(34), "A") to strip out the extra double quotation.

Hope my post can help someone who is struggling with the data type conversion issue.
What's the next?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Doesn't that mean that your function return value is also quoted, so it would make more sense to remove the extra quotes in your program so it doesn't get passed to the stage variable in the first place?
Post Reply