Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Declaring the procedure parameters

&pagelevel(4)&pagelevel

To enable parameters to be passed to a procedure when it is called, these parameters must be declared in the called procedure.

Procedure parameters are declared in the DECLARE-PARAMETER block by a DECLARE-PARAMETER command. If it is possible to declare all the procedure parameters within one command, the DECLARE-PARAMETER block may consist solely of a DECLARE-PARAMETER command.

If the parameter declarations require several DECLARE-PARAMETER commands, the DECLARE-PARAMETER block must be introduced by a BEGIN-PARAMETER-DECLARATION command and terminated by an END-PARAMETER-DECLARATION command. Between these two commands there may be any required number of DECLARE-PARAMETER commands

Apart from procedure parameters, variable containers can be opened within DECLARE-PARAMETER blocks by an OPEN-VARIABLE-CONTAINER command, making available within the DECLARE-PARAMETER block variables for use in setting the initial values for procedure parameters. The OPEN-VARIABLE-CONTAINER commands must appear before the first DECLARE-PARAMETER command.

The following attributes of the procedure parameters can be set in the DECLARE-PARAMETER command:

  • parameter name

  • initial value (if specified)

  • data type

  • type of parameter transfer

Each of these attributes is defined by means of an operand of the DECLARE-PARAMETER command.