Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

DECLARE-PARAMETER

&pagelevel(3)&pagelevel

Declare procedure parameters

Component:

SDF-P-BASYS

Functional area:

Procedures

Domain:

PROCEDURE                                                                                                         

Privileges:

STD-PROCESSING
OPERATING
HARDWARE-MAINTENANCE
SECURITY-ADMINISTRATION
SAT-FILE-MANAGEMENT
SAT-FILE-EVALUATION

Function

The DECLARE-PARAMETER command declares procedure parameters in an S procedure together with the method used to pass the parameter values to the procedure (initial value, prompting, etc.).
It is part of the procedure head. If several DECLARE-PARAMETER commands are issued, they must be combined to form a command block (declaration section) by means of BEGIN-PARAMETER-DECLARATION and END-PARAMETER-DECLARATION commands.

Restrictions

Specification of values other than the defaults for the TYPE and TRANSFER-TYPE operands is possible only if the chargeable SDF-P subsystem has been loaded.

Format

DECLARE-PARAMETER                                                                                                                               

NAME = list-poss(2000): <structured-name 1..20>(...)


<structured-name 1..20>(...)



|

INITIAL-VALUE = *NONE / *PROMPT(...) / <text 0..1800 with-low expr>



|


*PROMPT(...)



|



|

PROMPT-STRING = *STD / <text 0..1800 with-low string-expr>



|



|

,DEFAULT-VALUE = *NONE / <text 0..1800 with-low expr>



|



|

,SECRET-INPUT = *NO / *YES



|

,TYPE = *ANY / *STRING / *INTEGER / *BOOLEAN



|

,TRANSFER-TYPE = *BY-VALUE / BY-REFERENCE

Operands

NAME = list-poss(2000): <structured-name 1..20>(...)
Defines the names of the procedure parameters used.
Procedure parameters are S variables that are known within the procedure.
The following attributes are declared for each procedure parameter:

INITIAL-VALUE =
This defines the initial value.

INITIAL-VALUE = *NONE
The procedure parameter is not initialized, i.e. no initial value is declared. When the procedure is called a value must be assigned to the procedure parameter (see the CALL-PROCEDURE or ENTER-PROCEDURE command).

INITIAL-VALUE = *PROMPT(...)
If no value is declared when the procedure is called, SDF-P queries the value when the procedure parameter occurs for the first time (prompting). Prompting is only possible within a dialog. If prompting is not possible or if no value has been entered to the dialog then the initial value declared in the DEFAULT-VALUE operand is used.

PROMPT-STRING = 
Defines a string that is output as the prompt string. The text specified for DEFAULT-VALUE = ... is added to the prompt string. The prompt always ends with a colon. The prompt therefore has the following form:
<prompt-string>'BLANK'(DEFAULT = <default-value>)'BLANK':

PROMPT-STRING = *STD
By default, the parameter name specified in NAME=... (variable name) is output.

PROMPT-STRING = <text 0..1800 with-low string-expr >
Defines the string that is to be output as the prompt string.

DEFAULT-VALUE =
Defines an initial value for cases where no input (i.e. only [DUE]) is entered to the dialog or the procedure runs in the background. The value is output (for information) as part of the prompt.

DEFAULT-VALUE = *NONE
No (default) string is declared.

DEFAULT-VALUE = <text 0..1800 with-low expr>
Expression that is used as the default for the initial value. The specified expression must match the parameter type.

SECRET-INPUT = *NO / *YES
You can specify whether the dialog input is to be protected or entered in a nondisplaying field. In this case, the input is not logged.

INITIAL-VALUE = <text 0..1800 with-low expr >
The procedure parameter has the initial value derived from the specified expression (for permitted expressions see the section "SDF-P-BASYS"). This initial value is assumed if no other value is declared when the procedure is called. 

TYPE = *ANY / *STRING / *INTEGER / *BOOLEAN
This defines the variable type of the procedure parameter.
Specification of an operand value other than the default value *ANY is possible only if the chargeable subsystem SDF-P has been loaded.

TRANSFER-TYPE = *BY-VALUE / *BY-REFERENCE
This defines the type of parameter transfer.
Specification of an operand value other than the default value *BY-VALUE is possible only if the chargeable subsystem SDF-P has been loaded.

Return codes

The DECLARE-PARAMETER command can only be used within the procedure header of an S procedure. SDF-P detects errors in the procedure head during pre-analysis and terminates the procedure call. The command return codes can only occur if the command is used outside the procedure head.

(SC2)

SC1

Maincode

Meaning


0

CMD0001

No error


1

CMD0202

Syntax error


1

SDP0118

Command in incorrect context


3

CMD2203

Incorrect syntax file


32

CMD0221

System error (internal error)


130

SDP0099

No further address space available