Page 1 of 1

Compare alphanumeric with comp-3, possible?

Posted: Sun Nov 16, 2014 12:55 pm
by Ajay Chowdhary
Hi,

I'm involved in coding a program which has got a web based interface. The input from web will be taken in variable WEB-IN with PIC X(7). In the program I need to compare this with a working storage variable WS-AMOUNT, it is defined as PIC S9(3)v9(3) comp-3.

Assume, WEB-IN has the value 123.456, can someone please tell me how to compare an alphanumeric with comp-3 variable now?

Re: Compare alphanumeric with comp-3, possible?

Posted: Mon Nov 17, 2014 12:24 am
by Robert Sample
Use intrinsic function NUMVAL to convert WEB-IN into a numeric PIC S9(03)V9(03) variable, then do the comparison.

Re: Compare alphanumeric with comp-3, possible?

Posted: Wed Nov 19, 2014 8:07 pm
by Ajay Chowdhary
Thanks, this has helped.