Page 1 of 1

Removing comma on a value - Need your help

PostPosted: Thu Oct 31, 2013 8:48 pm
by rajaranganathan
Hi All,

Thanks for all your support and help on this.

I have a value which is comma separated and i required to remove the comma interms of adding the values using sort.

Example:
13,398
48,483
645


Expected result:
0013398
0048483
0000645


Can any one , please help me with this ??

Re: Removing comma on a value - Need your help

PostPosted: Thu Oct 31, 2013 9:28 pm
by BillyBoyo
Define your entire field as a UFF format (Unsigned Free Format). This will process the field to remove all non-numeric characters, you can then have it output as a ZD of length 8 to get your result. If you needed decimal places or something else, like still have leading spaces, you would use an EDIT to do the formatting, but your case is really simple.

Re: Removing comma on a value - Need your help

PostPosted: Thu Oct 31, 2013 9:31 pm
by rajaranganathan
Bill,
Thank you very much for your help. If you don't mind can you please provide me an example to define the field as UFF format ? I tried google but it didn't work out.

Re: Removing comma on a value - Need your help

PostPosted: Thu Oct 31, 2013 9:48 pm
by NicC
why don't you try the manual?

Re: Removing comma on a value - Need your help

PostPosted: Fri Nov 01, 2013 4:16 pm
by rajaranganathan
Hi All,

Thank you very much for your help. It worked.

INREC BUILD=(01:4,7,UFF,M11,LENGTH=7

Raja.R

Re: Removing comma on a value - Need your help

PostPosted: Fri Nov 01, 2013 4:30 pm
by BillyBoyo
OK. Thanks for letting us know. You only need the column number on BUILD if you want to leave something set to the fill value, so you don't need the 01:.