Exporting event specifications from a policy

If a policy rule action is to emit an event, you can export event specifications for that event as a schema or copybook for use elsewhere.

Before you begin

You must have a CICS® policy with its rule action defined as Emit an event. For instructions, see Creating a policy in a CICS bundle project.

About this task

The exported files contain the format of the event data, which is useful for you to process captured data with your programs or data processing engines.

The data format specified by your chosen EP adapter, or the EP adapter in your chosen EP adapter set, determines whether the exported file is a schema or a copybook:
  • For an XML format such as common base event, common base event REST, Decision Server Insights Event, or WebSphere® Business Events, the exported file is an XML schema definition .xsd file. The following adapters can emit events in XML character formats:
    • HTTP adapter
    • TD Queue adapter
    • TS Queue adapter
    • IBM® MQ Queue adapter
  • For a non-XML format, that is, CICS flattened event format, the exported file is a COBOL copybook .cpy file. The following adapters can emit events in CICS flattened event format:
    • TD Queue adapter
    • TS Queue adapter
    • IBM MQ Queue adapter
Note: You cannot export event specifications for a Transaction Start adapter or a custom adapter.

Procedure

  1. On the Rules tab of the policy definition editor, navigate to the Action section.
    Action tab on the Rules tab of the policy definition editor
  2. Ensure that the Emit an event action is selected with an EP adapter or EP adapter set specified.
  3. Click Export Event Specifications.
  4. You will be prompted to choose an adapter or adapter set in any of the following cases:
    • In your workspace, more than one EP adapter has the same name as the specified adapter or an adapter in the specified EP adapter set.
      Choose the EP Adapter window
    • In your workspace, more than one EP adapter set has the specified adapter set name.
      Choose the EP Adapter Set window
  5. In the Export Event Specifications for Rule window, ensure that correct information is specified in corresponding fields:
    The Export Event Specifications for Rule window
    Export
    The policy rule for which you want to export event specifications.
    To Directory
    The local directory to which you want to save the exported event specifications.
    Data Format

    The data format specified in your EP adapter, or the EP adapter in your EP adapter set.

    This field is displayed when CICS Explorer cannot determine the data format because the EP adapter, EP adapter set, or an EP adapter within the EP adapter set is not in your workspace.

    Note: Ensure the data format information matches that specified in your EP adapters, otherwise it might fail when you use the exported files for data processing.
    Version

    The version of the CICS region that will emit the event, that is, the region to which the policy will be deployed.

    This field is displayed when the policy rule applies to CICS TS 5.3 and earlier.

  6. Click OK.
  7. If an exported event specification with the same name already exists in the specified directory, you are prompted whether to overwrite the existing file or cancel the export.

Results

One or more files are created in the specified directory for the policy rule. Examples in the following table show files that are created for different events where no event names are specified.

If an event name is specified, it is used as the prefix of the exported file name. For example, if an event name of event_name is specified in the first example, the output file is named event_name_dsie_CICS_54.xsd. For instructions about defining event names, see Creating a policy in a CICS bundle project.
Table 1. Exported event specification files for different events
EP adapters or adapter sets Policy rule Version Data format Exported event specifications
IBM MQ Queue adapter A file open status system rule V54 or later Decision Server Insights Event (XML) format An XML schema file named fileEnable_rule_dsie_CICS_54.xsd, which you can use in the IBM Operational Decision Manager Insight® Designer tool to help define an event.
TD or TS Queue adapter A storage requests task rule V51 - 53 common base event REST (XML) format An XML schema file named cics_policy_event_payload_cbe_CICS_51-53.xsd, which you can import into IBM Business Monitor to define an inbound event.
V54 or later An XML schema file named task_rules_payload_cbe_CICS_54.xsd, which you can import into IBM Business Monitor to define an inbound event.
IBM MQ Queue adapter A file open status system rule V54 or later CICS Flattened Event format A COBOL copybook named DFHMPFEO_CICS_54.cpy, which you can use to process data in your own event consumer programs.
An EP adapter set that has:
  • a TD or TS Queue adapter (CICS Flattened Event format)
  • an IBM MQ Queue adapter (WebSphere Business Events (XML) format)
A file open status system rule V54 or later

CICS Flattened Event format WebSphere Business Events (XML) format

Two files named DFHMPFEO_CICS_54.cpy and fileEnable_rule_wbe_CICS_54.xsd, which you can use in your programs and in the IBM Operational Decision Manager Event Designer tool.