Insert Decimal

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
shrey3a
Premium Member
Premium Member
Posts: 234
Joined: Sun Nov 21, 2004 10:41 pm

Insert Decimal

Post by shrey3a »

Hi,

I've data from source file coming as
05500
04500

I need to insert the decimal place as 05.500 Iwas thinking of splitting the
column as Arg1[1,2]:'.':Arg1[3,3] is there is any built in or better way of doing it, I tried selecting scale in the plugin stage but it makes the data as 05500.000 ...looked in FMT function also but no help from there.

Regards,
Raghumreddy
Participant
Posts: 24
Joined: Fri Aug 26, 2005 3:52 pm
Contact:

Re: Insert Decimal

Post by Raghumreddy »

Divide the number by 1000

Ans = Arg1/1000

Hope this helps.
Raghu
shrey3a wrote:Hi,

I've data from source file coming as
05500
04500

I need to insert the decimal place as 05.500 Iwas thinking of splitting the
column as Arg1[1,2]:'.':Arg1[3,3] is there is any built in or better way of doing it, I tried selecting scale in the plugin stage but it makes the data as 05500.000 ...looked in FMT function also but no help from there.

Regards,
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Search the forum for OCONV. It has the necessary options for implied decimal conversion and rounding.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

As does the FMT command.
-craig

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