CONNECT
Opens a connection to the specified Database object.
CONNECT
Db (Database Object)
Err (Indicator Variable | *EXTENDED)
Parameters
Db
Required. A Database Object defined with the DCLDB command.
Err
Optional. Err determines what the runtime will do if an error occurs while executing this command. The following rules apply:
- Err (Indicator Variable) - The specified Indicator is set if an error occurred.
- Err (*EXTENDED) - A program status flag is set whose status can be checked using the %ERROR built-in function.
- If the Err keyword is not given and an error occurs, a runtime exception will be thrown.
Remarks
To close the connection to the database, use DISCONNECT.