


SQL-PL allows sequential operating system files to be read and written. These files must be opened for processing by means of an OPEN control option.

In following READFILE or WRITEFILE statements definite files are referred to by means of the file id. Note: A file that has been opened to be read cannot be written.

The condition

is satisfied when a READFILE statement has been executed although the last record of the file had already been read in.
The CLOSE statement serves to close files explicitly.

For all files that are still open when the program is terminated, an implicit CLOSE is executed.

The DELETEFILE statement can be used to delete files.
Syntax:

For partial support, SQL-PL provides the WRITETRACE statement which writes exclusively into the protocol file.
WRITETRACE only has an effect when the MODULETRACE or SQLTRACE option is used simultaneously.
Example:

Syntax:



