$Close: Difference between revisions
m (1 revision) |
mNo edit summary |
||
Line 2: | Line 2: | ||
<span class="pageSubtitle"><section begin="desc" />Close file or group in User Language request<section end="desc" /></span> | <span class="pageSubtitle"><section begin="desc" />Close file or group in User Language request<section end="desc" /></span> | ||
<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. | <p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is currently no OO equivalent for the $Close function.</p> | ||
The $Close function allows a user to close a file or group from within a User Language request. | The $Close function allows a user to close a file or group from within a User Language request. | ||
Line 32: | Line 32: | ||
<p class="caption">$Close return codes | <p class="caption">$Close return codes | ||
</p> | </p> | ||
The following program closes file 'KRUSTY'. | The following program closes file 'KRUSTY'. | ||
Line 40: | Line 39: | ||
</p> | </p> | ||
<p class="code"> | <p class="code"> | ||
[[Category:$Functions|$Close]] | [[Category:$Functions|$Close]] |
Revision as of 19:57, 31 January 2011
<section begin="desc" />Close file or group in User Language request<section end="desc" />
Most Sirius $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 User Language request.
$Close accepts one argument and returns a numeric code. It is also callable .
The only argument is the name of the file or group to be closed. This name can be either an unqualified name, in which case the standard 204 search order (TEMP GROUP, PERM GROUP, FILE) will be used to try to identify the file or group; or it can be a qualified name that 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 that $Close will first look for a temporary group and then a permanent group.
Syntax
<section begin="syntax" /> %RESULT = $Close(fgname) <section end="syntax" />
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 5 - Can't close required subsystem member 6 - Can't close member of open temp group
The following program closes file 'KRUSTY'.
B %RC = $Close( 'KRUSTY' ) END