user variable activity

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
adityavinay
Participant
Posts: 32
Joined: Tue Dec 13, 2011 7:27 am

user variable activity

Post by adityavinay »

Can some one help me on how to convert string to integer in uservariable activity in sequencer.

I have a value in file , using 'Execute command Activity' i am reading the value and making it as parameter using 'User Variable Activity'. This parameter will be used in start loop.
Is it possible to convert the string (user variable) to integer value? If so can you please provide the Syntax to achieve it.

Thanks,
Vinay.
adityavinay
Participant
Posts: 32
Joined: Tue Dec 13, 2011 7:27 am

Re: user variable activity

Post by adityavinay »

Found the solution in publib.boulder.ibm.com
Using Oconv function this will be achieved.
syntax = Oconv("outputvalue", "MCN")
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

This isn't PX so you don't really need to explicity convert it. You do, however, need that function if you have to remove "non-numeric" values from the string. It is the equivalent of the DIGITS transform.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply