Writing a registration program

CICS® provides an interface so that you can register a callback program to handle a resource type when it is deployed in a bundle.

About this task

You can write a registration program in any of the supported programming languages. The containers that you must use are described in the DFHRLUCx copybooks, where x represents the programming language. These copybooks are in the SDFHSAMP member of the CICSTS56.CICS library.

Procedure

  1. Link to program DFHRLVC, passing the channel DFHRLVC-V1 and the following required containers:
    • DFHRL-ACTION, containing the action to register or deregister the callback program.
    • DFHRL-PROGRAM, containing the name of the callback program.
    • DFHRL-TYPE, containing the universal resource name (URN) of the resource type that the callback program is going to manage.
  2. If CICS cannot register or deregister the callback program, CICS populates the DFHRL-ERROR container.
    Your program must handle these responses and perform suitable processing if an error occurs.
  3. To ensure that the resource type in a bundle is correctly recovered, add your registration program to the post-initialization program list table (PLTPI).
    On a warm or emergency restart, CICS uses the information provided by the registration program to request that the resource types defined in installed BUNDLE resources are recreated.

Results

When you install a BUNDLE resource that contains your resource type, CICS uses the callback program specified by the registration program to handle the resource type. If the resource type is not registered with CICS or if the callback program is not available, the BUNDLE resource installs in a disabled state and the resource type itself installs in an unusable state.