The DBID exit can be invoked in either batch or online CA Dataquery™ for CA Datacom®. See DQOPTLST Parameters for information on the System Option Table parameters CDBIDSL=, CDBXITB=, and CDBXITO=.
In batch or online, when a query is validated, this exit is called once for each table named in the query and has the opportunity to change the CA Datacom®/DB ID of any table.
Provides CA Dataquery™ for CA Datacom® with the correct CA Datacom®/DB identifier prior to execution of a DQL Language query. When query validation is complete, CA Dataquery™ for CA Datacom® gives control to this exit and passes the following to the exit:
The exit can change the CA Datacom®/DB table name causing CA Dataquery™ for CA Datacom® to update its processing control blocks to reflect the new information. This process occurs one time for every table for each query.
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™ for CA Datacom® and the user exit program is always 3 bytes, packed, regardless of the actual length of the database ID.
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™ for CA Datacom® 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
(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™ for CA Datacom®.
The exit is expected to set the return code field in the record as follows:
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™ for CA Datacom®.