HP 3000 Manuals

Example 6: CALL Pseudo-Intrinsic .LOC. [ HP COBOL II/XL Migration Guide ] MPE/iX 5.0 Documentation


HP COBOL II/XL Migration Guide

Example 6:  CALL Pseudo-Intrinsic .LOC. 

This example shows how the GIVING identifier of the .LOC.
pseudo-intrinsic should be changed for COBOL II/XL.

Given the following identifiers:

          WORKING-STORAGE SECTION.
          01  INFILE-REC    PIC X(14) VALUE SPACES.
          01  INFILE-ADDR   PIC S9(4) COMP VALUE -1.

the following CALL statement will generate an error:

          CALL INTRINSIC ".LOC." USING INFILE-REC
                                 GIVING INFILE-ADDR.

You should change the definition of INFILE-ADDR to one of the following:

          01  INFILE-ADDR    PIC S9(9) COMP VALUE 0.

                       or, for a long pointer

          01  INFILE-ADDR    PIC S9(18) COMP VALUE 0.



MPE/iX 5.0 Documentation