Writing to Fixed width file

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
parsi_cnu
Charter Member
Charter Member
Posts: 43
Joined: Thu Dec 04, 2003 4:26 pm

Writing to Fixed width file

Post by parsi_cnu »

When i am writing a numeric field the data is preceded with blank and the actual value

eg:actual value1000.00 and data showing in the file as ' 1000.00'. there is a blank infront of 1 and im not able to trim this.

how to handle this?

Thanks
sri
Last edited by parsi_cnu on Mon Apr 28, 2008 8:28 pm, edited 1 time in total.
just4u_sharath
Premium Member
Premium Member
Posts: 236
Joined: Sun Apr 01, 2007 7:41 am
Location: Michigan

trim(col_name,' ','A')

Post by just4u_sharath »

trim(col_name,' ','A')
try this
parsi_cnu
Charter Member
Charter Member
Posts: 43
Joined: Thu Dec 04, 2003 4:26 pm

Actually i am calculating field in the transformer

Post by parsi_cnu »

actually i am dividing numeric column/10

source numeric column(length 7)/10 and target numeric column of length 6,2
just4u_sharath
Premium Member
Premium Member
Posts: 236
Joined: Sun Apr 01, 2007 7:41 am
Location: Michigan

Post by just4u_sharath »

try this

TRIM(TRIM(COL_NAME,CHAR(10)),CHAR(13))
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The space is the sign character. You could specify the Numeric data type to be unsigned.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
parsi_cnu
Charter Member
Charter Member
Posts: 43
Joined: Thu Dec 04, 2003 4:26 pm

Len(Trim(numeric_col))

Post by parsi_cnu »

How can we do?


thanks
sr
Post Reply