Open Access Files

An Open Access file is a file which has all its operations handled by a user-written program or procedure, rather than by the operating system. This program or procedure is called an "Open Access Handler" or simply a "handler".

For example, the handler for an Open Access printer file will get control when the file is opened, when data is written to the file, and when the file is closed. Then handler will determine when overflow occurs.

An Open Access file is defined by specifying the HANDLER keyword on the file definition. It can be a program-described file or an externally-described file, although specific handlers may place their own restrictions on the type of file they support.

The file is not required at runtime, unless the specific handler requires it.

Other than the HANDLER keyword, an Open Access file is used in the same way that it would be used if it did not have the HANDLER keyword.

See HANDLER(program-or-procedure { : communication-area)}) for examples of the HANDLER keyword.

See Example of an Open Access Handler for an example of an Open Access handler.

See the Rational Open Access: RPG Edition topic for information on writing an Open Access handler.