2.2.7.10 ENVCHANGE

Token Stream Name

 ENVCHANGE

Token Stream Function

A notification of an environment change (such as database and language).

Token Stream Comments

  • The token value is 0xE3.

  • Includes old and new environment values.

Token Stream-Specific Rules

 TokenType        =   BYTE
 Length           =   USHORT
 Type             =   BYTE
 NewValue         =   B_VARBYTE
 OldValue         =   B_VARBYTE
 EnvValueData     =   Type
                      NewValue
                      OldValue

Token Stream Definition

 ENVCHANGE        =   TokenType
                      Length
                      EnvValueData

Token Stream Parameter Details

Token stream parameter details are described in the following table.

Parameter

Description

TokenType

ENVCHANGE_TOKEN

Length

The total length of the ENVCHANGE data stream (EnvValueData).

Type

The type of environment change:

1: Database

2: Language

3: Character set

4: Packet size

Type

Old value

New value

1: Database

OLDVALUE = B_VARBYTE

NEWVALUE = B_VARBYTE

2: Language

OLDVALUE = B_VARBYTE

NEWVALUE = B_VARBYTE

3: Character set

OLDVALUE = B_VARBYTE

NEWVALUE = B_VARBYTE

4: Packet size

OLDVALUE = B_VARBYTE

NEWVALUE = B_VARBYTE

Note

For types 1, 2, and 3, the payload is an MBCS string; the LENGTH always reflects the number of bytes.