      * https://fr.wikiversity.org/wiki/COBOL/Sous-programmes
000001 IDENTIFICATION DIVISION.
000002   PROGRAM-ID. a.
000003 DATA DIVISION.
000004   WORKING-STORAGE SECTION.
000005     77 x PIC 999 VALUE 34.
000006     77 y PIC 999 VALUE 77.
000007     77 max PIC 999.
000008 PROCEDURE DIVISION.
000009 main.
000010   CALL "max" USING CONTENT x y REFERENCE max.
000011   DISPLAY "max (" x "," y ") = " max.
000012   STOP RUN.
000013 END PROGRAM a.
000014****************************
000015 IDENTIFICATION DIVISION.
000016   PROGRAM-ID. max.
000017 DATA DIVISION.
000018   LINKAGE SECTION.
000019     77 a PIC 999.
000020     77 b PIC 999.
000021     77 max PIC 999.
000022 PROCEDURE DIVISION USING a b max.
000023 prog.
000024   IF a > b
000025     THEN MOVE a TO max
000026     ELSE MOVE b TO max
000027   END-IF.
000028   EXIT PROGRAM.
000029 END PROGRAM max.
