Start of change

SYSVARIABLES

The SYSVARIABLES table contains one row for each global variable.

The following table describes the columns in the SYSVARIABLES table:

Table 1. SYSVARIABLES table
Column Name System Column Name Data Type Description
VARIABLE_SCHEMA VARSCHEMA VARCHAR(128) Schema name of the variable.
VARIABLE_NAME VARNAME VARCHAR(128) Name of the variable.
SYSTEM_VAR_SCHEMA SYSVSCHEMA CHAR(10) System schema name.
SYSTEM_VAR_NAME SYSVNAME CHAR(10) System variable name.
VARIABLE_OWNER OWNER VARCHAR(128) Authorization ID of the owner of the global variable.
VARIABLE_DEFINER DEFINER VARCHAR(128) Name of the user that created the variable.
VARIABLE_CREATED CREATDTS TIMESTAMP Identifies the timestamp when the variable was created.
SCOPE SCOPE CHAR(1) Indicates the scope of the variable:.
S
Session
OWNER_TYPE OWNER_TYPE CHAR(1) Indicates the owner of the variable:
U
The owner is an idividual user
USER_DEFINED_TYPE_SCHEMA TYPESCHEMA VARCHAR(128)

Nullable

Schema of the data type if this is a distinct type.

Contains the null value if the variable is not a distinct type.

USER_DEFINED_TYPE_NAME TYPENAME VARCHAR(128)

Nullable

Name of the data type if this is a distinct type.

Contains the null value if the variable is not a distinct type.

DATA_TYPE DATA_TYPE VARCHAR(128) Type of variable:
BIGINT
Big number
INTEGER
Large number
SMALLINT
Small number
DECIMAL
Packed decimal
NUMERIC
Zoned decimal
FLOAT
Floating point; FLOAT, REAL, or DOUBLE PRECISION
DECFLOAT
Decimal floating-point
CHAR
Fixed-length character string
VARCHAR
Varying-length character string
CLOB
Character large object string
GRAPHIC
Fixed-length graphic string
VARG
Varying-length graphic string
DBCLOB
Double-byte character large object string
BINARY
Fixed-length binary string
VARBIN
Varying-length binary string
BLOB
Binary large object string
DATE
Date
TIME
Time
TIMESTMP
Timestamp
Start of changeXMLEnd of change
Start of changeXMLEnd of change
DISTINCT
Distinct type
LENGTH LENGTH INTEGER The length attribute of the data type; or, in the case of a decimal, numeric, or nonzero precision binary variable, its precision:
8 bytes
BIGINT
4 bytes
INTEGER
2 bytes
SMALLINT
Precision of number
DECIMAL
Precision of number
NUMERIC
8 bytes
FLOAT, FLOAT(n) where n = 25 to 53, or DOUBLE PRECISION
4 bytes
FLOAT(n) where n = 1 to 24, or REAL
8 bytes
DECFLOAT(16)
16 bytes
DECFLOAT(34)
Length of string
CHARACTER
Maximum length of string
VARCHAR or CLOB
Length of graphic string
GRAPHIC
Maximum length of graphic string
VARGRAPHIC or DBCLOB
Length of binary string
BINARY
Maximum length of binary string
VARBINARY or BLOB
4 bytes
DATE
3 bytes
TIME
10 bytes
TIMESTAMP
Start of change2147483647 bytesEnd of change
Start of changeXMLEnd of change
Same value as the source type
DISTINCT
NUMERIC_SCALE SCALE INTEGER

Nullable

Scale of numeric data.

Contains the null value if the data type is not decimal, numeric, or binary.

STORAGE STORAGE INTEGER The storage requirements for the variable:
8 bytes
BIGINT
4 bytes
INTEGER
2 bytes
SMALLINT
(Precision/2) + 1
DECIMAL
Precision of number
NUMERIC
8 bytes
FLOAT, FLOAT(n) where n = 25 to 53, or DOUBLE PRECISION
4 bytes
FLOAT(n) where n = 1 to 24, or REAL
8 bytes
DECFLOAT(16)
16 bytes
DECFLOAT(34)
Length of string
CHAR
Maximum length of string + 2
VARCHAR
Maximum length of string + 29
CLOB
Length of string * 2
GRAPHIC
Maximum length of string * 2 + 2
VARGRAPHIC
Maximum length of string * 2 + 29
DBCLOB
Length of binary string
BINARY
Maximum length of binary string + 2
VARBINARY
Maximum length of string + 29
BLOB
4 bytes
DATE
3 bytes
TIME
10 bytes
TIMESTAMP
Start of change2147483647 +29 bytesEnd of change
Start of changeXMLEnd of change
Same value as the source type
DISTINCT
Note: This column supplies the storage requirements for all data types.
NUMERIC_PRECISION PRECISION INTEGER

Nullable

The precision of all numeric data types.
Note: This column supplies the precision of all numeric data types, including decimal floating-point and single-and double-precision floating point. The NUMERIC_PRECISION_RADIX column indicates if the value in this column is in binary or decimal digits.

Contains the null value if the data type is not numeric.

CCSID CCSID INTEGER

Nullable

Start of changeThe CCSID value for CHAR, VARCHAR, CLOB, DATE, TIME, TIMESTAMP, GRAPHIC, VARGRAPHIC, DBCLOB, XML, and DATALINK data types.

Contains the null value if the data type is numeric.

End of change
CHARACTER_MAXIMUM_LENGTH CHARLEN INTEGER

Nullable

Start of changeMaximum length of the string for binary, character, and graphic string data types and the XML data type.

Contains the null value if the data type is not a string or XML.

End of change
CHARACTER_OCTET_LENGTH CHARBYTE INTEGER

Nullable

Start of changeNumber of bytes for binary, character, and graphic string data types and the XML data type.

Contains the null value if the data type is not a string or XML.

End of change
NUMERIC_PRECISION_RADIX RADIX INTEGER

Nullable

Indicates if the precision specified in column NUMERIC_PRECISION is specified as a number of binary or decimal digits:
2
Binary; floating-point precision is specified in binary digits.
10
Decimal; all other numeric types are specified in decimal digits.

Contains the null value if the data type is not numeric.

DATETIME_PRECISION DATPRC INTEGER

Nullable

The fractional part of a date, time, or timestamp.
0
For DATE and TIME data types
6
For TIMESTAMP data types (number of microseconds).

Contains the null value if the data type is not date, time, or timestamp.

DEFAULT DEFAULT DBCLOB(2M)

CCSID 1200

Start of changeThe expression used to calculate the initial value of the global variable when it is first referenced.End of change
IASP_NUMBER IASPNUMBER SMALLINT Start of changeSpecifies the independent auxiliary storage pool (IASP) number of the variable.End of change
Start of changeVARIABLE_TEXTEnd of change Start of changeLABELEnd of change Start of changeVARGRAPHIC(50)

CCSID 1200

Nullable

End of change
Start of changeA character string supplied with the LABEL statement (type text).

Contains the null value if the type has no text.

End of change
Start of changeLONG_COMMENTEnd of change Start of changeREMARKSEnd of change Start of changeVARGRAPHIC(2000)

CCSID 1200

Nullable

End of change
Start of changeA character string supplied with the COMMENT statement.

Contains the null value if there is no long comment.

End of change
DEFAULT_SCHEMA QUALIFIER VARCHAR(128)

Nullable

Qualifier for unqualifed tables and views.
SQL_PATH SQL_PATH VARCHAR(3483)

Nullable

Identifies the path.
ROUNDING_MODE DECFLTRND CHAR(1) Identifies the DECFLOAT rounding mode.
C
ROUND_CEILING
D
ROUND_DOWN
F
ROUND_FLOOR
G
ROUND_HALF_DOWN
E
ROUND_HALF_EVEN
H
ROUND_HALF_UP
U
ROUND_UP
       
End of change