Previous Topic: Writing Data to the TerminalNext Topic: BIND PROCEDURE


Communicating with Database Procedures

Database procedures, which can be invoked before or after various DML functions, are defined in the schema by the DBA. For example, a data compression routine might be invoked before STORE and MODIFY; a decompression routine might be invoked after FIND.

Use of Database Procedures

Database procedures typically have more authority than application programs. For example, they can access all record elements of a schema-defined record and not just the fields defined in the subschema view. Therefore, if your program must provide more information than is provided by the DBMS itself, you can establish communications with a database procedure. Such instances are unusual; in most cases, you are not aware of the procedures called before or after various DML commands.

Steps to Establish Communication

To establish communications with a database procedure, add the following fields to program variable storage:

Statements to Communicate with Database Procedures

The following statements enable your program to communicate with database procedures:

These statements are explained below.