Code: Select all
IDENTIFICATION DIVISION.
PROGRAM-ID. SOMEPGM.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-INPUT1 PIC Z(8).
01 WS-INPUT2 PIC 9(9).
PROCEDURE DIVISION.
PARA.
ACCEPT WS-INPUT1.
DISPLAY WS-INPUT1.
ACCEPT WS-INPUT2.
DISPLAY WS-INPUT2.
INITIALIZE WS-INPUT1.
INITIALIZE WS-INPUT2.
STOP RUN.
5
2
9
It shows the 5 and 000000002 which is correct but there is no error showed up for 9. Why does this happnen? And how would it behave in the Enterprise COBOL?