Skip to content
CA Datacom Core - 15.1
Documentation powered by DocOps

DBID Exit

Last update August 18, 2015

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:

  • CA Datacom® Datadictionary™ entity-name
  • CA Dataquery™ for CA Datacom® user identification
  • CA Datacom®/DB table name
  • CA Datacom®/DB database ID

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.

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™ for CA Datacom® 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™ 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

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™ for CA Datacom®.

The exit is expected to set the return code field in the record as follows:

  • 0
    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™ for CA Datacom® uses the new database ID.
  • 990 -- 999
    An error occurred in the exit. CA Dataquery™ for CA Datacom® 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.
  • Any other
    CA Dataquery™ for CA Datacom® 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™ for CA Datacom®.

Was this helpful?

Please log in to post comments.