close
Log off from the specified path or from all paths.
close
{"
PathName/net"
}
Example: close "$MY_PATH"
Qualifiers
Qualifier | Description |
---|---|
/net | Specifies that PathName
is a TCP or TLS network path, and is treated as part of the PathName. If the
path was opened using /net, it must also closed using /net.
For the following path names, /net is implicit and does not have to be supplied: $DNP, $TCP, and $TLS. Any path not recognized as a network path is assumed to be a DBMS path. |
Parameters
Parameter | Data Type | Description |
---|---|---|
PathName |
String |
Name of a DBMS or network path, such as
$MSS . $DATA , or $TCP . The leading dollar sign
($) is required.
|
Return Values
Value | Meaning |
---|---|
0
|
The path was successfully closed. |
-3
|
Exceptional I/O error (hardware or software). |
-16
|
Network error: unknown. |
Value | Error constant | Meaning |
---|---|---|
-2 through
-12 |
<UIOSERR_*>
|
Errors during database I/O. |
-16 through
-30 |
<UNETERR_*>
|
Errors during network I/O. |
-1107
|
<UPROCERR_PATH>
|
The path name is not correct or the path does not exist, for example, no assignment is found for the path, or the path was opened with /net but not closed with /net. |
Use
Allowed in all component types.
Description
When you close a path that leads to DBMS tables or files, it is recommended that a commit or rollback be performed before the close. In this way, the application does not rely on the behavior of the DBMS and behaves consistently.
The following example shows the use of the
close
statement to log off from all DBMSs:
; trigger: Detail if ($status = 1) rollback close apexit endif
The following statement closes the database identified by path $MMS:
close "$MSS"
The following statement closes the user-defined path $MY_PATH:
close "$MY_PATH"