Previous Topic: Programming User ExitsNext Topic: User-Defined Functions Exit


Query Validation Exit

CA Dataquery supports a user Query Validation Exit which allows you to enforce site standards. You can code the exit to the following:

Operation

A query can be rejected by your Query Validation Exit with a standard error message or a special error code to be used in conjunction with panels 990 through 999 as described in the information about register 15 below. (See DQOPTLST Parameters for more information about the VALEXIT= parameter of the System Option Table.)

Procedure

CA Dataquery provides ten panels that can be used to document errors that may result from tailoring your system. If you set return code 990-999, CA Dataquery will give error panels 990-999. You can create error messages.

Code this exit in the Assembler language. Make it reentrant or reusable. It must be linked to the CA Dataquery load library and have a PPT entry if under CICS.

Monitor calls and I/O requests cannot be issued by the Query Validation Exit.

When writing the exit, note the following register conventions:

Register 1

Points to a parameter list consisting of the following entries (in order from the beginning of the list):

Register 13

Contains the address of a register SAVE area which you must use to save and restore CA Dataquery's registers according to standard linkage conventions.

Register 14

Contains the return address within CA Dataquery.

Register 15

Contains the address of the entry point of the exit.

Prior to returning control to CA Dataquery, the exit must place one of the following return codes in register 15.

See DBID Exit for an explanation of return codes and their meanings.

Implementation

To implement the Query Validation Exit:

  1. Code the VALEXIT= parameter in the DQOPTLST macro and reassemble the CA Dataquery System Option Table. (See :spotref refid=valex for more information about the VALEXIT= parameter of the System Option Table.)
  2. If running under CICS/VS:
    1. Assemble and link edit the user exit into the regular CICS program library under the name specified in the VALEXIT= parameter.
    2. Add an entry for the exit to the CICS PPT.

For samples, see the CA Datacom website.