wierd Iconv expresion

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
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

wierd Iconv expresion

Post by roy »

Hi All,
seen this expresion in a job:

Code: Select all

iconv(myDate,"DYMD" : @VM : "MCN")
it does return the same as:

Code: Select all

Iconv(myDate,"DYMD")
I was wondering was there something I missedd regarding Iconv
or is it simply a missused syntax (that accidentaly works) ?

Thanks,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

It's not a syntax I've seen in the wild, only posted here by Ray. :wink:

The Value Mark allows you to do multiple transformations without in-lining the function call repeatedly. So it is equivalent to:

Code: Select all

IConv(IConv(myDate,"DYMD"),"MCN")
However, it makes no sense to me as "MCN" is the DIGITS transform to get only numeric values from a string and the output from IConv is already a number. So this would make more sense with OConv, which is where I've typically seen it. So you are right in that it seems to fall into the "accidentally works" category. :wink:
-craig

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