ILE COBOL Programmer's Guide

Identifying the Linkage Type of Called Programs and Procedures

When calling another ILE COBOL program that is not in the same module object as the calling program and the call is made through a CALL literal statement, you must specify whether the called program is an ILE program object or an ILE procedure.

You identify whether you are calling a program object or a procedure by specifying the linkage type of the call.

The LINKAGE type of call can be specified explicitly or it can be forced by specifying a phrase that is associated with a particular linkage. For example, the IN LIBRARY phrase forces a call to be a LINKAGE program. In the instances where there is not a phrase that forces a linkage, there are three ways to explicitly specify a linkage. They are listed in order of precedence:

  1. The LINKAGE phrase of the CALL, CANCEL, or SET...ENTRY statements
  2. The LINKAGE TYPE clause of the SPECIAL-NAMES paragraph
  3. the LINKLIT parameter of the CRTCBLMOD and CRTBNDCBL commands, or the associated PROCESS statement option.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]