公共基本事件格式
公共基本事件格式基于公共基本事件规范 V 1.0.1(基于 XML 的格式) ,使用 CICS® 事件数据的公共基本事件模式中的 xs:any 槽。 该格式可以由任何能够识别公共基本事件 XML 格式的使用者使用。
您可以使用事件绑定编辑器指定要使用的事件格式。 有关适配器属性和受支持格式的更多信息,请参阅 CICS Explorer 产品文档中的 "指定 EP 适配器和分派器" 信息。
此代码片段显示在 事件绑定编辑器中选择公共基本事件格式时发出的格式。 本节后面括号 {}
中的字段来自捕获的事件或捕获事件的 CICS 区域。 如 component 所示,该示例显示了 CICS TS 6. 3。
<?xml version="1.0"?>
<cbe:CommonBaseEvent xmlns:cbe="http://www.ibm.com/AC/commonbaseevent1_0_1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="1.0.1"
creationTime="{yyyy-mm-ddThh:mm:ssZ}">
<cbe:sourceComponentId component="IBM CICS TS#6.3.0"
componentIdType="ProductName" executionEnvironment="IBM z/OS"
instanceId="{NETQUAL}.{APPLID}" location="{MVSSYSTEM}"
locationType="Hostname" subComponent="CICS EP"
componentType="http://www.ibm.com/xmlns/prod/cics/eventprocessing" />
<cbe:situation categoryName="OtherSituation">
<cbe:situationType xsi:type="OtherSituation"
reasoningScope="EXTERNAL">
<CICSApplicationEvent/>
</cbe:situationType>
</cbe:situation>
<cics:event
xmlns:cics="http://www.ibm.com/xmlns/prod/cics/events/CBE">
<cics:context-info>
<cics:eventname>{BusinessEvent}</cics:eventname>
<cics:usertag>{User Tag}</cics:usertag>
<cics:networkapplid>{NETQUAL}.{APPLID}</cics:networkapplid>
<cics:timestamp>yyyy-mm-ddThh:mm:ss.mmmZ</cics:timestamp> 1
<cics:bindingname>{Event Binding Name}</cics:bindingname>
<cics:capturespecname>{Capture Spec Name}</cics:capturespecname>
<cics:UOWid>{network unit of work id}</cics:UOWid>
</cics:context-info>
<cics:payload-data>
<data:payload xmlns:data="http://www.ibm.com/prod/cics/{User Tag}/{BusinessEvent}">
<data:customer>IBM</data:customer>
<data:orderValue>10250</data:orderValue>
<data:orderReference>QWERTY098765</data:orderReference>
</data:payload>
</cics:payload-data>
</cics:event>
</cbe:CommonBaseEvent>
CICS 通用基本事件格式中的 xs:any 元素包含静态部分(<cics:event> 标记)和动态部分(<data:payload> 标记),前者对每种 CICS 通用基本事件格式都是相同的,后者对每种事件规范都是不同的。 静态和动态部分由不同的 XML 模式描述。
静态 XML 模式与 CICS 一起安装在位置中:/usr/lpp/cicsts/cicsts/schemas/eventprocessing/eventformats/cics_cbe_static.xsd. 您可以从 Event binding 编辑器中的 Adapter 选项卡导出 CICS 通用基本事件事件格式的动态模式;有关详细信息,请参阅 Specifying EP adapter and dispatcher information in CICS Explorer 产品文档。
CICS 事件上下文和有效载荷数据包含在 <cics:event> 元素的 <cics:context-info> 和 <cics:payload-data> 子元素中。 动态模式提供有效内容数据的映射。
向无法识别公共基本事件格式的事件使用者 (例如, IBM® WebSphere® Message Broker) 发送 CICS 公共基本事件格式事件时,请将静态 XML 模式用于公共基本事件格式。 有关更多信息,请参阅 公共基本事件 XML 模式。