COMP variables

How to view the value of COMP variables?

Questions by gandikotasiva   answers by gandikotasiva

Showing Answers 1 - 1 of 1 Answers

Move the comp variable to the variable with datatype numeric. Then you could be able to display this variable.

Code
  1. WORKING-STORAGE SECTION.

  2. 05 COMP-VAR PIC 9(4) COMP VALUE 5000.

  3. 05 NUM-VAR   PIC 9(4).

  4. .

  5. .

  6. .

  7. PROCEDURE DIVISION

  8. MOVE COMP-VAR TO NUM-VAR  

  9. DISPLAY THE VALUE OF COMP VAR/NUM VAR IS NUM-VAR   .

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions