Using the PARM operation

The PARM operation is used to identify the parameters which are passed from or received by a procedure. Each parameter is defined in a separate PARM operation. You specify the name of the parameter in the Result field; the name need not be the same as in the calling/called procedure.

The Factor 1 and factor 2 entries are optional and indicate variables or literals whose value is transferred to or received from the Result Field entry depending on whether these entries are in the calling program/procedure or the called program/procedure. Table 1 shows how factor 1 and factor 2 are used.

Table 1. Meaning of Factor 1 and Factor 2 Entries in PARM Operation
Status Factor 1 Factor 2

In calling
procedure

Value transferred from Result Field entry upon return. Value placed in Result Field entry when call occurs.

In called
procedure

Value transferred from Result Field entry when call occurs. Value placed in Result Field entry upon return.
Note: The moves to either the factor 1 entry or the result-field entry occur only when the called procedure returns normally to its caller. If an error occurs while attempting to move data to either entry, then the move is not completed.
If insufficient parameters are specified when calling a procedure, an error occurs when an unresolved parameter is used by the called procedure. To avoid the error, you can either:
Keep in mind the following when specifying a PARM operation:
For examples of the PARM operation see:

Feedback