Not getting data in the proper format in the target

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
gopskrish
Participant
Posts: 37
Joined: Thu Mar 31, 2005 7:42 am

Not getting data in the proper format in the target

Post by gopskrish »

Hi Everybody,

I am loading data to sequential flat file with sybase as my source using paralex. I am not getting the number columns in proper format. If the value is big, it gives me an exponential value. In the target i have specified as float (same as the source)
When i changed to numeric(9,2) it adds 0 if the number value is small (eg for 55000 , i am getting 0055000.00. I want the column value in the same way as in the source. Even changing the target type to Varchar gives me the same kind of output as the first one (exponential)

If the source value is 9500000 then the target value should be the same.
How to handle the same in Paralel extender. Let me know.
I am new to Paralex.

cheers,
Gopal
ds_is_fun
Premium Member
Premium Member
Posts: 194
Joined: Fri Jan 07, 2005 12:00 pm

Post by ds_is_fun »

define the target column as VarChar. Following is a sample logic that you can use:

If Right(Trim(y),3)[1,1] = '.' Then y Else If Right(Trim(y),3)[2,1] = '.' Then y : '0' Else y : '.00'

where y = Trim(DecimalToString(DSLink2.a,"fix_zero,suppress_zero"),"0","L")
gopskrish
Participant
Posts: 37
Joined: Thu Mar 31, 2005 7:42 am

Post by gopskrish »

Hi ,

Thanks for helping me out on that. It is really working great. Great job and u have prooved that datastage is really fun. Nice job.I have been fighting with this for almost a day.

cheers,
gops
I am verymuch interested to learn an ETL tool and i find datastage as the best one to do so.
Post Reply