string to decimal

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
kavuri
Premium Member
Premium Member
Posts: 161
Joined: Mon Apr 16, 2007 2:56 pm

string to decimal

Post by kavuri »

Hi,
I am passing a text and seperating fields based on location as shown below. But as my string consists of decimal values, I am trying to convert these by using stringtodecimal function. Its resulting 00000.00 as output for that field. Let me give more details as below.

StringToDecimal(DSLink3.INPUT[58,64])

This resulting " 00000.00" as output. Where as my input looks like 0002.39

Please tell me what I can do to have appropriate results. Any sort of help is appreciated.

Thanks
Kavuri
siddesai
Participant
Posts: 26
Joined: Thu Apr 26, 2007 11:28 pm

Re: string to decimal

Post by siddesai »

Why have you got

Code: Select all

[58,64]
? Are you trying to use SubString?

I have come across similar issues and mostly it is because your output column may still be String and not changed to Decimal? Is that SubString causing issues?[/code]
Teej
Participant
Posts: 677
Joined: Fri Aug 08, 2003 9:26 am
Location: USA

Post by Teej »

A decimal field is not 64 character long. Are you confusing that with the [start,end] of C++? It's actually [start,length].
Post Reply