Assign values to S variable
Component: | SDF-P-BASYS |
Functional area: | Procedures |
Domain: | PROCEDURE |
Privileges: | STD-PROCESSING |
Function
The SET-VARIABLE command assigns values to an S variable. If the S variable does not yet exist, it is implicitly declared by SDF-P. Implicit declaration of S variables is preset but can be prohibited using the SET-PROCEDURE-OPTIONS command.
For command entry, it is also possible to abbreviate
/SET-VARIABLE <variable1> = <variable2> / <text>
to
/<variable1> = <variable1> / <text>
The notation without the command name is also recommended for performance reasons (see the “SDF-P” User Guide [34]).
Restrictions
If the chargeable SDF-P subsystem is not available, the SET-VARIABLE command may refer to simple S variables only (TYPE=*ANY and MULTIPLE-ELEMENTS=*NO).
Complex S variables are part of the chargeable SDF-P subsystem; their use is described in the “SDF-P” manual [34].
Format
SET-VARIABLE Alias: STV | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Operands
<composed-name1 1..255>
Name of an S variable to which a value is assigned.
= <text 0..1800 with-low expr>
Assigns the value which results from the evaluation of expression to composed-name1.
A valid SDF-P expression must be specified for expression (see section "SDF-P-BASYS" or the “SDF-P” manual [34]).
= <composed-name2 1..255>
Assigns the value of the S variable composed-name2 to the specified S variable composed-name1
.
= *STRING-TO-VARIABLE(STRING=<text 0..1800 with-low string-expr>, VALUE-TYPE=...)
Only allowed in the case of complex S variables
Assigns to the specified S variable composed-name1 the value resulting from the conversion of string-expression to an S variable structure. For conversion rules, see the “SDF-P” manual [34].
= *LIST( LIST-NAME=...,FROM-INDEX=...,NUMBER-OF-ELEMENTS=... )
Only allowed in the case of complex S variables
Assigns the elements of a list variable to the specified S variable composed-name. Depending on the number of assigned list elements, composed-name must be either a simple or a composed S variable.
WRITE-MODE
Defines how the allocation of values is to be carried out.
= *REPLACE
Overwrites an existing value (default).
= *MERGE
Only allowed in the case of complex S variables
= *EXTEND
Only allowed in the case of complex S variables
= *PREFIX
Only allowed in the case of complex S variables
Complex S variables are part of the chargeable SDF-P subsystem; their use is described in the “SDF-P” manual [34].
Return codes
The command return code has no guaranteed value if an error occurs when complex S variables are assigned.
(SC2) | SC1 | Maincode | Meaning/Guaranteed messages |
---|---|---|---|
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) | |
64 | SDP0091 | Semantic error | |
130 | SDP0099 | No more address space available |