![]() | ![]() |
Home |
|
|
Access Service User's Guide DirectConnect for AS/400 |
|
| Chapter 3 Querying and setting operating values |
|
| Querying global variables |
A user or client application can query global variables to find the property and processing values that affect that particular client connection.
A global variable represents one of the following:
A configuration property value
Information about the processing state of the current connection
The current value for a configuration property resulting from a set statement
Global variables are preceded by two "at" (@@) symbols and are not case sensitive. To query a global variable, issue a SQL select statement in the following form:
select @@variable_name
where variable_name is the name of the relevant global variable.
The access service returns the configuration property value or the processing information for the current connection. For example, the SQL statement select @@Allocate returns the Allocate configuration property value of either connect or request.
For convenience and ease-of-use, we recommend you use DirectConnect Manager to configure the access service library.
Other guidelines for querying global variables are as follows:
All global values can be queried regardless of the SQL transformation mode in effect for the connection.
The global variable statement must be the only statement in a request.
The statement can be terminated with a semicolon.
A user or client application can issue set statements to change values that only affect the current client connection. These values remain in effect only for the duration of the client connection or until another set statement is issued.
To set an access service configuration property value or processing value for the current connection, issue a set statement in the form:
set { property_name | processing_name } valuewhere:
property_name is the name of the configuration property.
processing_name is the name of the processing option.
value is a valid value for the configuration property.
For example, the statement set Allocate request sets the Allocate configuration property value to request.
The following guidelines apply to issuing set statements:
A client can set values regardless of the SQL transformation mode in effect for the connection.
The set statement must be the only statement in a request.
set statements are not case sensitive.
|
|