HP 3000 Manuals

Example 5: CALL with Numeric Identifier [ HP COBOL II/XL Migration Guide ] MPE/iX 5.0 Documentation


HP COBOL II/XL Migration Guide

Example 5:  CALL with Numeric Identifier 

If you have defined the following identifier:

        WORKING-STORAGE SECTION.
        01  PLABEL      PIC S9(4) COMP.

the following CALL statement will generate an error:

        CALL PLABEL.

You should change the CALL statement so it calls the name of the
subprogram:

        WORKING-STORAGE SECTION.
        01  LABEL-NAME   PIC X(20) VALUE SPACES.
        PROCEDURE DIVISION.
                   .
                   .
            MOVE "sub-name" TO LABEL-NAME.
            CALL LABEL-NAME.

                       or

            CALL "sub-name".



MPE/iX 5.0 Documentation