IBM Extension

LINKAGE TYPE Clause

The LINKAGE TYPE clause specifies the type of linkage to be made on a CALL to or a CANCEL of the program specified by literal-7, and to the type of linkage to be made on the SET statement.

LINKAGE TYPE Clause - Format

Read syntax diagramSkip visual syntax diagramLINKAGE1 TYPEISenvironment-name-3PROGRAMPROCEDUREFORliteral-7USINGlinkage-arguments
linkage-arguments
Read syntax diagramSkip visual syntax diagramALLinteger-1THRUTHROUGHinteger-2ISAREDESCRIBED
Notes:
  • 1 IBM® Extension
environment-name-3
Environment-name-3 can be defined as:
PGM
Linkage to a program object (*PGM) is generated.
PRC
Linkage to an ILE procedure is generated.
SYS
Linkage to a system-supplied procedure is generated.
PROGRAM
Linkage to a program object (*PGM) is generated. This is synonymous to an environment-name-3 of PGM.
PROCEDURE
Linkage to an ILE procedure is generated. This is synonymous to an environment-name-3 of PRC.
literal-7
Literal-7 is the name of the program object or procedure. Literal-7 can contain an extended-name. It can be at most 10 characters long for program names and 256 characters long for procedure names. Literal-7 is affected by the OPTION(*MONOPRC) parameter. When *MONOPROC is specified, lowercase characters are converted to uppercase and the rules for formation of a program-name are followed. See program-name in PROGRAM-ID Paragraph for details.
USING
Specifies which parameters are to have their operational descriptors made available to the called procedure. These parameters must be defined as elementary data items with a USAGE of DISPLAY or DISPLAY-1. They may not be reference modified.
The USING clause is allowed for a linkage type of procedure and applies only to a CALL statement.
integer-1, integer-2
Must be a positive non-zero integer. Specifies the ordinal position of any parameter described using operational descriptors.

Integer-2 must be greater than integer-1.

DESCRIBED
The parameters specified by integer-1 through integer-2 are passed along with corresponding operational descriptors. If ALL is specified, all parameters defined for the procedure are passed along with corresponding operational descriptors, where applicable.
End of IBM Extension