View previous topic :: View next topic
|
Author |
Message |
sumivel
New User
Joined: 13 Sep 2005 Posts: 18
|
|
|
|
i am working on web based COBOL Program....my input from web will be collected in variable say DISCOUNT with pic clause X(7)...in the program I WANT TO COMPARE the DISCOUNT from the web with the host variable WS-DISCOUNT with pic clause s9(3)v9(3) comp-3.
SAY....
01 DISCOUNT PIC x(7). let's value be 123.456
my host variable
WS-DISCOUNT PIC S9(3)V9(3) COMP-3
can any one tell me how to compare an alphanumeric with comp-3 variable? |
|
Back to top |
|
|
shreevamsi
Active User
Joined: 23 Feb 2006 Posts: 305 Location: Hyderabad,India
|
|
|
|
Hi,
You can use a Redefines clause before compare with the host variable |
|
Back to top |
|
|
sumivel
New User
Joined: 13 Sep 2005 Posts: 18
|
|
|
|
got error when redefine a alphanumeric with comp-3 variable....even if i redefine with 9(3)v9(3) it is taking the decimal point and the last digit is truncated. |
|
Back to top |
|
|
shreevamsi
Active User
Joined: 23 Feb 2006 Posts: 305 Location: Hyderabad,India
|
|
|
|
Redefine as:
9(3).9(3) |
|
Back to top |
|
|
|