OPEN
- Last UpdatedJan 24, 2023
- 1 minute read
Description
Connects Query to a specified data server (via a server daemon).
Many communication channels may be open concurrently, each being identified by a token (an integer) which is returned by the server and stored in a named variable for subsequent reference.
Example
EXTERNAL OPEN ’MAINTENANCE’ !!MAINT AS ’bull/robert’
EXTERNAL OPEN ’MAINTENANCE’ !!MAINT ON ’pc35’ AS ’bull/robert’
Syntax
>- EXTERnal OPEn synonym token_var -+- ON hostid-.
| |
‘------------+- AS connect_string -.
| |
‘---------------------+->
Here, 'synonym' is a text string which identifies the server daemon through which communication is to be channeled. The synonyms must be defined in the 'daemon_file' - refer to Appendix A.
'token_var' identifies a variable to be used to store the integer token returned by the server when the communication channel is successfully opened. The User uses the setting of this variable for all subsequent references to that server daemon.
'hostid' is a text string which identifies the node on which the server daemon resides (not required for ODBC or if the daemon is running on the same node as Query).
'connect_string' is any text string needed to allow you to connect/login to the data server (typically contents and DB name, username and password).