Previous Topic: Process CommandsNext Topic: READ TRANSACTION


CLOSE

The CLOSE command is a batch-only command that closes a dialog's input and/or output file maps. If an application terminates with files still open, the runtime system automatically closes the files.

Note: A CLOSE command closes a file logically only if other dialogs using different maps have accessed the same file. To close the file physically, a CLOSE command must be issued for each map.

The CLOSE command is required when you want to close a file before the application terminates, as in the following cases:

Syntax for the CLOSE command is shown below:

►►── CLOSE ─────┬─ BOTH ◄ ──┬─── file MAPs ──── . ─────────────────────────────►◄
                ├─ INPUT ───┤
                └─ OUTPUT ──┘
CLOSE BOTH/INPUT/OUTPUT FILE MAPS

Specifies the file map to be closed, as follows: