The DBID exit can be invoked in either batch or online CA Dataquery. See DQOPTLST Parameters for information on the System Option Table parameters CDBIDSL=, CDBXITB=, and CDBXITO=.
Operation
When a query is validated, this exit is called once for each table named in the query and has the opportunity to change the database ID of any table. If database IDs greater than 999 are to be used, the CDBIDSL= parameter of the System Option Table must be set to YES. When this parameter is set to YES the database ID field passed between CA Dataquery and the user exit program is always 3 bytes, packed, regardless of the actual length of the database ID.
CICS Procedure
In the CICS environment, the exit should be a command-level or macro-level CICS program. Input to the exit is a CICS temporary storage record named DQttttCD, where tttt is the ID of the terminal that the CA Dataquery session is running. The exit must read this record whose contents are:
USER-NAME CHARACTER 32 BYTES SIGNED ON USER NAME TABLE-NAME CHARACTER 32 BYTES OCCURRENCE NAME OF CA Datacom/DB TABLE TABLE-DBID (CDBIDSL=NO) CHARACTER 3 BYTES CA Datacom/DB DATABASE ID (CDBIDSL=YES) PACKED 3 BYTES CA Datacom/DB DATABASE ID RETURN-CODE BINARY 4 BYTES RETURN CODE FROM THE EXIT QUERY-ADDR BINARY 4 BYTES ADDRESS OF QUERY QUERY-LEN BINARY 2 BYTES LENGTH OF QUERY
After processing, the exit should rewrite the temporary storage record. No change should be made to the query itself. Any changes made will not be honored by CA Dataquery.
The exit is expected to set the return code field in the record as follows:
No errors occurred in the exit. In this case, if the exit has altered the database ID associated with the table in the temporary storage record, CA Dataquery uses the new database ID.
An error occurred in the exit. CA Dataquery attempts to display an error message having this message number. This range of error numbers is reserved for messages created by site administration. You should be sure that an error message has been created if your exit supplies a return code in this range. Query validation fails.
CA Dataquery displays DQ048E with the return code from the exit appended. Query validation fails.
Batch Procedure
The exit should be an Assembler language program that observes standard program linkage conventions. On entry to the exit, register 1 points to a fullword that contains the address of the area described above. The exit should modify this area in place before returning control to CA Dataquery.
|
Copyright © 2014 CA.
All rights reserved.
|
|