HP 3000 Manuals

Example 7: Calls to Intrinsics [ HP COBOL II/XL Migration Guide ] MPE/iX 5.0 Documentation


HP COBOL II/XL Migration Guide

Example 7:  Calls to Intrinsics 

The following example illustrates the change required for calling
intrinsics.  Although this example shows only one of the many intrinsics,
the keyword INTRINSIC must be added to any HP system intrinsic called by
a COBOL II/XL program.  $CONTROL CALLINTRINSIC may also be used as a
migration aid.  Refer to the section "CALLINTRINSIC" in Chapter 2.

          CALL "FOPEN" USING @FILE-NAME \FOPTIONS\ \AOPTIONS\ \RECORD-SIZE\
                           \\ \\ \\ \BLOCK-FACTOR\ \\ \00000\ \\ \\ \\ \%17040\
                     GIVING FILE-NUMBER.

The previous statement should be changed to the following for COBOL
II/XL.

          CALL INTRINSIC "FOPEN" USING FILE-NAME FOPTIONS AOPTIONS
                                     RECORD-SIZE \\ \\ \\
                                     BLOCK-FACTOR
                               GIVING FILE-NUMBER.


NOTE Many of the intrinsics are non-COBOL procedures. Use of the keyword INTRINSIC lets the compiler determine the data type requirements of the intrinsic via the procedure parameter declarations contained in the MPE intrinsics file SYSINTR.PUB.SYS.


MPE/iX 5.0 Documentation