Page 1 of 1

Replace spaces in Alphanumeric with zeros

PostPosted: Wed Sep 10, 2008 12:19 pm
by djorj
Hi All,

I need replace spaces with zeros in alphanumeric fields to asign a numeric filelds. It is posible?

I have PIC X(10) -> ' 123'

I need PIC X(10) -> '0000000123' to asign a PIC 9(10).

The PIC X(10) comes from input file of FAST UNLOAD with OUTPUT-FORMAT E, but on table is a numeric, so i need to use it a numeric.


Or must be formatted with a sort?

Thanks Everyone

Re: Replace spaces in Alphanumeric with zeros

PostPosted: Wed Sep 10, 2008 10:00 pm
by dick scherrer
Hello djorj and welcome to the forums,

In your cobol program you might INSPECT the field replacing spaces with zeros.

If this will not work for your requirement, please clarify.