CLOSE command

From m204wiki
Jump to navigation Jump to search


Any user
Closes a specified file, temporary group, or permanent group, or all of a user's open files and groups


CLOSE [ALL |[FILE [PERM | TEMP] GROUP] name [AT location]]


  • ALL closes all of the user's open files and groups.

  • name is the name of the Model 204 file or group to be closed.

    If a file name or group name is not specified in the command, the default file or group is closed.

  • location

    • For Parallel Query Option/204 files, is the symbolic name (as many as eight characters) that refers to the location of the node on which the remote file resides. An equal sign without surrounding quotation marks (=) specifies that the file is local.

    • If remote, must match a symbolic destination name specified in the DESTINATION parameter of the relevant local client DEFINE PROCESS command.

Syntax notes

If neither FILE nor GROUP is specified, as in the following command, Model 204 attempts to close a file named PAYROLL:


If the file cannot be found, Model 204 searches for a temporary group by that name. If a temporary group cannot be found, it searches for a permanent group by that name.



Usage notes

The CLOSE command closes a Model 204 file or a permanent or temporary group. If the name of the file or group is not specified, Model 204 closes the default file or group. When the default is closed, Model 204 issues a message informing the user that a new default file or group must be established. A new default can be defined with either the DEFAULT command or the OPEN command.

When a temporary group is closed, its member files remain open and can continue to be individually usable. The individual files must be closed by name or by means of a CLOSE ALL command.

When a permanent group is closed, its member files are automatically closed. If any of the member files were opened individually or as part of another permanent group, those files remain open for individual use or as part of that other group, respectively.

For information about what happens when you lose communications with a remote node during or just prior to your attempt to close a remote file, see PQO: Remote files and scattered groups.

In the following case only, CLOSE causes Model 204 to end any update unit in progress and begin a non-backoutable update unit: if the CLOSE results in some file becoming unusable (that is, usable neither individually nor as a member of a permanent group).

When a file is opened in deferred update mode, Model 204 protects the file by making it impossible to free the file in that Model 204 run until all updates have been applied. All files are closed completely at the end of the Model 204 run.