HP 3000 Manuals

Ch 4. Subprograms and Intrinsics [ HP COBOL II/XL Programmer's Guide ] MPE/iX 5.0 Documentation


HP COBOL II/XL Programmer's Guide

Chapter 4  Subprograms and Intrinsics 

Introduction 

A subprogram is a routine that either is not in the program that calls
it, or is nested within another program.  It is the object of a CALL
statement.  Its source language can be the same as that of the calling
program, or different.

An intrinsic is a system-supplied procedure, an external interface to the
operating system or subsystem services that can be called through the
intrinsic mechanism.  The intrinsic mechanism checks the types and bounds
of parameter values before using them.  An intrinsic is not different
from a subprogram that you write yourself, except that the details of its
task are invisible to you.

This chapter explains the following:

   *   External names, which apply to subprograms, intrinsics, and data.
   *   Internal names, which apply to nested programs.
   *   Locality set names.
   *   Chunk names.
   *   Data alignment on MPE XL (relevant to parameter alignment).
   *   How COBOL checks actual parameters against their formal
       counterparts.
   *   How COBOL passes actual parameters to subprograms and intrinsics.
   *   When subprogram and intrinsic calls are bound to their
       definitions.
   *   How your COBOL program, compiled in Native Mode, can use switch
       stubs to call subprograms compiled in Compatibility Mode.
   *   How your COBOL program can call subprograms written in COBOL.
   *   How your COBOL program can call subprograms written in other
       languages.
   *   How your COBOL program can share EXTERNAL data items and files
       with other programs.
   *   Briefly, how your COBOL program can share GLOBAL data items and
       files with other programs (but see Chapter 3  for details).
   *   How your COBOL program can call intrinsics.



MPE/iX 5.0 Documentation