Re: DATA MANIPULATION TEXT TO SIGNED NUMERIC RM COBOL



I'll try that out Bob, thanks for the help unfortunately today I got to go
to one of the stores and take care of a couple of hardware problems, so I'll
get back on this tomorrow. the problem is really occurring cause my input
field is TRX-AMOUNT PIC X OCCURS 22 TIMES. may look something like this.
-709.98
5.00
-9500.01
1204.00
of course then followed by a bunch of blanks to round out the field.
when I move say whole-amt to E1 to view, its been placing placing a 9
instead of the negative sign so my output will look like the following.
9709.98
5.00
99500.01
1204.00
and output like that will very much upset the bean counters ;) anyway thanks
for the help and I'll get back to you gentleman when I get a chance to work
on this some more.

"donald tees" <donald@xxxxxxxxxxxxx> wrote in message
news:9bGdneqp2pumvYnbnZ2dnUVZ_sGqnZ2d@xxxxxxxxxxxxx
Bob Iles wrote:
the sign.
01 AMOUNT-ARRAY-NUMERIC.
03 WHOLE-AMT PIC S9(22)V99 trailing separate VALUE ZEROS.
03 AMOUNT-HOLD-NUM REDEFINES WHOLE-AMT
OCCURS 23 TIMES pic x.
d. move zeros to whole-amount and then find the last number position
in your input field, moving last postion to 22
last-1 to 22-1 etc...
e. as you are moving your bytes until position 1 check for
an "-" and if found move to position 23.

your resulting field of amount-array-numeric should look like
0000000000000000000000+ and move a valid numeric value.

If you need some example code for this, let me know.
bob.

Is it just me, or is not "PIC S9(22)V99 trailing separate VALUE ZEROS." a
field 25 characters long ... to whit: 22 digits,implied decimal point, 2
digits +sign byte?

Donald


.



Relevant Pages