$Close: Difference between revisions
m (misc formatting) |
m ("SOUL" replaces "UL") |
||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:$Close}} | {{DISPLAYTITLE:$Close}} | ||
<span class="pageSubtitle">Close file or group in | <span class="pageSubtitle">Close file or group in SOUL request</span> | ||
<p class="warn"><b>Note:</b> Many $functions have been deprecated in favor of Object Oriented methods. There is currently no OO equivalent for the <var>$Close</var> function. </p> | <p class="warn"><b>Note:</b> Many $functions have been deprecated in favor of Object Oriented methods. There is currently no OO equivalent for the <var>$Close</var> function. </p> |
Revision as of 16:43, 18 May 2018
Close file or group in SOUL request
Note: Many $functions have been deprecated in favor of Object Oriented methods. There is currently no OO equivalent for the $Close function.
The $Close function allows a user to close a file or group from within a SOUL request.
$Close accepts one argument and returns a numeric code. It is also callable.
Syntax
%result = $Close(fgname)
Syntax terms
%result | A numerical variable set to indicate the success of the function. See Status codes. |
---|---|
fgname | The name of the file or group to be closed. This name can be unqualified or qualified. If unqualified, the standard Model 204 search order (TEMP GROUP, PERM GROUP, FILE) is used to try to identify the file or group. If qualified, this name explicitly indicates whether $Close is to act on a file or group.
Some examples of qualified names are: 'TEMP GROUP FOO' 'FILE HOHO' 'PERM GROUP CHUCKLES' 'GROUP KRUSTY' Note that the last example is not fully qualified, so $Close will first look for a temporary group and then a permanent group. |
Status codes
The $Close function operates like the CLOSE command, only it allows you to close a file from within a SOUL request. $Close restrictions are listed below among the non-zero values of %result. In short, you cannot close a file or group that has requests compiled against it, has currently included procedures, or is a non-optional subsystem file or group:
0 - File/group closed 1 - File/group name missing 2 - File/group not open 3 - Can't close because of INCLUDE'd proc 4 - Can't close because compiled code accesses file/group, or file is group default file 5 - Can't close required subsystem member 6 - Can't close member of open temp group
Example
The following program closes file KRUSTY
:
b %rc = $Close('KRUSTY') End