000000 IDENTIFICATION DIVISION.
000000 PROGRAM-ID. IPCONVERT.
000000 DATA DIVISION.
000000 WORKING-STORAGE SECTION.
000000 01 WS-A  PIC 9(10).
000000 01 WS-B  PIC 9(10).
000000 01 WS-C  PIC 9(10).
000000 01 WS-D  PIC 9(10).
000000 01 WS-DEC PIC 9(10) VALUE IS ZERO.
000000 LINKAGE SECTION.
000000 01 LS-IP    PIC X(17).
000000 PROCEDURE DIVISION.
000000    UNSTRING LS-IP DELIMITED BY SPACES
000000       INTO WS-A, WS-B, WS-C, WS-D
000000    END-UNSTRING.
000000    MULTIPLY 16777216 BY WS-A.
000000    MULTIPLY 65536 BY WS-B.
000000    MULTIPLY 256 BY WS-C.
000000    ADD WS-A WS-B WS-C WS-D TO WS-DEC.
000000    DISPLAY "IP " LS-IP " converts into " WS-DEC.
000000 STOP RUN.
