Opening a data table

A data table must be opened before it can be used by an application.

You open a data table in the same way as you would any CICS® file, by one of the following methods:
  • Automatically, by the CICS-supplied transaction CSFU, at the end of CICS startup, if the data table is defined with OPENTIME(STARTUP).
  • Explicitly by a CEMT or EXEC CICS request issued by the user.
  • Implicitly, on first reference to the data table, if the data table is defined with OPENTIME(FIRSTREF). The first remote access to a closed data table implicitly opens it.

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. Developing for access to 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:
    • creates MVS storage pools for use by shared data table support
    • creates an MVS data space for use by this region's data tables
    • attempts a LOGON operation as a server
  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 data space storage.
  7. CICS issues a message to indicate the result of the loading. The message number is:
    • if loading is successful: DFHFC0941
    • if loading fails: DFHFC0942, DFHFC0943, DFHFC0945, DFHFC0946, DFHFC0947, or DFHFC0948
    The message is sent to the CSFL transient data queue. Also, if loading fails, the message is sent to the console.
  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.


dfhf1kj.html | Timestamp icon Last updated: Sunday, 4 June 2017