#COMPILE EXE
#DIM ALL

FUNCTION PBMAIN() AS LONG
    LOCAL a AS LONG
    LOCAL b AS LONG
    LOCAL msg AS STRING * 20
    a = 10
    b = 0
    msg = ""
    #COBOL USING a, b, msg
       IDENTIFICATION DIVISION.
       PROGRAM-ID. SwapAndMsg.
       DATA DIVISION.
       LINKAGE SECTION.
       01 A PIC 9(18).
       01 B PIC 9(18).
       01 MSG PIC X(20).
       PROCEDURE DIVISION USING A, B, MSG.
           MOVE A TO B.
           ADD 5 TO B.
           MOVE "swapped and added" TO MSG.
           STOP RUN.
    #ENDCOBOL
    PRINT a
    PRINT b
    PRINT msg
    FUNCTION = 0
END FUNCTION
