Maximum Number of Arguments for a Function or Subroutine Call

The maximum number of arguments that may be passed in an Open PL/I program is given by the following formula, which holds generally for any function or subroutine call argument list:

N + M= 241

where:

N     Is the actual number of arguments specified.
M Is the position of the last *-extent argument, or zero if none exists.

Example:

DECLARE (S, T, U, V) CHAR (32),
   (I, J, K, L) BINARY (15),
   MYSUB ENTRY (BINARY(15), BINARY (15), CHAR(*),
         CHAR(*), BINARY(15), BINARY(15));
.
.
.
   CALL MYSUB(I,J,K,S,T,L);

where:

N     = 6 (the number or arguments specified)
M = 5 (the position of "T" in the argument list)

which gives:

N+ M     = 11 (6 actual arguments; 3 dummy descriptors for I, J, and K; and 2 actual descriptors for S and T).