IDENTIFICATION DIVISION.
PROGRAM-ID. MV.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-N1 PIC 9(8).
01 WS-N2 PIC 9(8).
01 WS-N3 PIC 9(5).
01 WS-N4 PIC 9(4).
01 WS-EMP-ADDRESS.
05 WS-EMP-HOUSE-NUMBER PIC 9(3).
05 WS-EMP-STATE PIC X(11).
05 WS-EMP-PIN PIC 9(6).
01 WS-STUDENT-ADDRESS.
05 WS-STUD-HOUSE-NUMBER PIC 9(3).
05 WS-STUD-STATE PIC X(11).
05 WS-STUD-PIN PIC 9(5).
PROCEDURE DIVISION.
A000-FIRST-PARA.
MOVE 23657891 TO WS-N1.
MOVE WS-N1 TO WS-N2 WS-N3.
MOVE WS-N1(2:4) TO WS-N4.
MOVE 510 TO WS-EMP-HOUSE-NUMBER.
MOVE 'MAHARASHTRA' TO WS-EMP-STATE.
MOVE 444601 TO WS-EMP-PIN.
MOVE WS-EMP-ADDRESS TO WS-STUDENT-ADDRESS.
DISPLAY "WS-N1 : " WS-N1
DISPLAY "WS-N2 : " WS-N2
DISPLAY "WS-N3 : " WS-N3
DISPLAY "WS-N4 : " WS-N4
DISPLAY "WS-EMP-ADDRESS : " WS-EMP-ADDRESS
DISPLAY "WS-STUDENT-ADDRESS : " WS-STUDENT-ADDRESS
STOP RUN.
Numeric | Alphabetic | Alphanumeric | |
Numeric | Possible | Not Possible | Possible |
Alphabetic | Not Possible | Possible | Possible |
Alphanumeric | Possible | Possible | Possible |