With this code you have to enter 3.28, which will give you as display result : blank3.28, with other words you must use the decimal point on the keyboard. However: if you add another line to your code, you will get the desired result and your 0328 will be displayed as 3.28 on Microfocus Cobol. 01 TEST-RECORD. 05 PR-NUM PIC 9999. 05 pr-num0 redefines pr-num pic 99v99. 05 PR-NUM1 PIC ZZ.99. Display "Enter number" ACCEPT PR-NUM move PR-NUM0 to PR-NUM1 DISPLAY PR-NUM1 STOP RUN.
↧