Positional parameters are specified without the name of the corresponding parameter and are separated from each other by commas.
If procedure parameters are passed as positional parameters, the order in which the procedure parameters are declared in the called procedure must be taken into account. The parameters are evaluated in the order in which they are declared with DECLARE-PARAMETER commands.
This means that if only one procedure parameter is declared in each DECLARE-PARAMETER command, the first procedure parameter specified is mapped onto the parameter (name) that is declared as the first in the first DECLARE-PARAMETER command, the second is mapped onto the parameter name in the second DECLARE-PARAMETER command, etc.
If several procedure parameters are declared in one DECLARE-PARAMETER command, the procedure parameters that are passed are mapped onto them in the order in which the parameter names are specified.
When procedure parameters are declared, a valid value can already be preassigned to these parameters, i.e. they can be initialized. These procedure parameters can be “skipped” when parameters are passed in the procedure call if their initial value remains valid. When passing positional parameters, you must note where such “skipped” procedure parameters are located in the declaration sequence.
In the procedure call, procedure parameters that are already initialized do not have to be taken into account if they are the last procedure parameters in the declaration sequence.
If, however, these procedure parameters that are already initialized are followed by other procedure parameters, they must be passed as empty parameters; a single comma must be passed for the parameter to be skipped.
Example
PROC1 procedure
/... /CALL-PROCEDURE PROC2, PROCEDURE-PARAMETERS = (MILLER, EDWARD, 'HARPER AVENUE' - /, , , 1234567)
PROC2 procedure
/SET-PROCEDURE-OPTIONS /BEGIN-PARAMETER-DECLARATION / DECLARE-PARAMETER (LAST-NAME (*NONE, *STRING), FIRST-NAME (*NONE,- / *STRING)) / DECLARE-PARAMETER STREET(*NONE, *STRING) / DECLARE-PARAMETER CITY('CHICAGO', *STRING) / DECLARE-PARAMETER (AREA-CODE('312', *STRING), TEL(*NONE, *STRING)) /END-PARAMETER-DECLARATION
With the procedure call, six procedure parameters are passed to PROC2: last name (MILLER), first name (EDWARD) and street ('HARPER AVENUE'). No values are passed for the parameters CITY and AREA-CODE; for these parameters, commas are inserted. As a final value, the telephone number is passed. The procedure parameters CITY and AREA-CODE are preassigned with the values CHICAGO and 312 (because, for example, this is the address list of a company in Chicago). Since TRANSFER-TYPE = *BY-VALUE is preset, the specified procedure parameters are handled as value entries.