MSURESH309 wrote:Thanks for your suggestionss..Your answers worked for me..This is what I coded in my program..I got results as required..
WS-HOLD-AMT PIC X(18) JUST RIGHT.
WS-HOLD-AMT-NUM PIC 9(16)V99.
TOT-EXP-AMT PIC $$$,$$$,$$9.99 - display field - o/p
MOVE input-amount TO WS-HOLD-AMT
COMPUTE WS-HOLD-AMT-NUM = FUNCTION NUMVAL(WS-HOLD-AMT)
MOVE WS-HOLD-AMT-NUM TO TOT-EXP-AMT
Glad you have it working.
If your input-amount is the 18-character field, you don't need to move it to ws-hold-amt. If the fields are the same length, the JUST RIGHT makes no difference. NUMVAL can handle it being on the left. Also check in the manual, I have a feeling that you might be near the size limit for NUMVAL.