Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

RE: Question About Zero Suppression

$
0
0

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.            


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>