Opening a data table

A data table must be opened before it can be used by an application. This is done in the same way as for any CICS® file, by one of the following methods:

All the rules and options for opening a CICS file also apply to a file that is defined as a data table. In addition, the loading of the data table is initiated.

For a large data table, loading could take a significant time. Application programming for data tables discusses the application programming commands that can be used with a user-maintained data table, and the way that performance gains that can be achieved with a CICS-maintained data table are limited until loading is completed.

The following steps are done during the opening of the file:

  1. The access method control block (ACB) for the VSAM source data set is opened under a separate MVS™ task control block (TCB). This step is the same as for any CICS file.
  2. For the first data table used by a region, CICS:
  3. A special CICS transaction, CFTL, is attached to load the data table into the data space.
  4. The transaction that issued the request to open the data table can now continue processing.
  5. CICS issues a message DFHFC0940 to indicate that loading has started. The message is sent to the CSFL transient data queue.
  6. The transaction that loads the data table reads the source data set sequentially. Under the optional control of the user exit XDTRD, the transaction copies the records into the data space. It also constructs an index in address-space storage to facilitate subsequent access to the records.
  7. CICS issues a message to indicate the result of the loading. The message number is: The message is sent to the CSFL transient data queue. Also, if loading fails, the message is sent to the console. For descriptions of these messages, see CICS Messages and Codes.
  8. When loading is complete (whether successful or not), the user exit XDTLC is invoked if it is active. If the loading was not completed successfully, the exit program can request that the data table is closed.
  9. For a user-maintained data table, the ACB for the source data set is closed when loading is complete. The data set is deallocated if it was originally dynamically allocated and becomes available to other jobs, providing there are no other ACBs still open for it.

Note:
During an emergency restart, any file that requires backout action is reopened. However, if the file is defined as a data table, loading is not initiated at that time; instead it is initiated by the CSFU transaction at the end of the emergency restart. This gives an opportunity for any user exits that control the copying of records to the data table during loading to be activated at any stage of PLTPI processing.

Related concepts
Application programming for data tables
Operations with data tables
Closing a data table
MVS JCL requirements when using shared data tables
Interpreting data table statistics
Activating user exits for data tables
[[ Contents Previous Page | Next Page Index ]]