       IDENTIFICATION DIVISION.
       PROGRAM-ID. ZERO-BASED-ORD.
       
       DATA DIVISION.
       LINKAGE SECTION.
       01 LS-CHAR            PIC X(1).
       01 LS-ORD-RESULT      PIC 9(5) COMP-5.
       
       PROCEDURE DIVISION USING LS-CHAR, LS-ORD-RESULT.
           COMPUTE LS-ORD-RESULT = FUNCTION ORD(LS-CHAR) - 1.
           EXIT PROGRAM.
       END PROGRAM ZERO-BASED-ORD.