Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Defining a variable (DECLARE-VARIABLE)

&pagelevel(4)&pagelevel

The DECLARE-VARIABLE statement defines a variable which can be used in procedure statements and conditions.

Name of predefined variables (see section “Predefined variables”) may not be used in the DECLARE-VARIABLE statement. Some of the predefined variables are of the type C (e.g. RCODE).

DECLARE-VARIABLE

VARIABLE-NAME = <structured-name 1..20>

,TYPE = *STRING(...) / *INTEGER

*STRING

|

LENGTH = <integer 1..20>

,INITIAL-VALUE = <integer 1..16777215> / <c-string> / *STD / *NONE


VARIABLE-NAME = <structured-name 1..20>
Name of the variable. Names of predefined variables (see section “Predefined variables”) may not be used.

TYPE =
Type of variable.

TYPE = *STRING(...)
The variable is a text variable.

LENGTH = <integer 1..20>)
Length of the text variable. The default value is 5.

TYPE = *INTEGER
The variable is an integer variable.

INITIAL-VALUE =
Value which is to be predefined for the variable.

INITIAL-VALUE = <integer 1..16777215>
The variable should be initialized with an integer.

INITIAL-VALUE = <c-string>
The variable should be initialized with a string.

INITIAL-VALUE = *STD
INITIAL-VALUE *STD assigns blanks to a variable of the *STRING type and 0 to a variable of the INTEGER type.

INITIAL-VALUE = *NONE
In the case of INITIAL-VALUE *NONE the initialization value is undefined.