Using Container in Recipe Services
This section describes the recipe service process with the CICS program using a single container for input and output data.
Below is the sample that demonstrates how to define the configuration definition of Substation ES recipe service for EMS ESB.
- Setup Message Definition
SXTP01F ------------------ Define Fields in a Message ------ Row 1 to 18 of 20 Command ===> Scroll ==> CSR (Types: DAT, OPA, MSG, STR, BOL, I8, U8, I16, U16, I32, U32, I64, U64, F32, F64, POR, IPA) Message Id ===> MESSAGE-BYTE Sel Type Dec Id Seq Name - --- - --- ---- ------------------------------------------------------ OPA 0 0 0 DATA 0 0 0
- Setup Buffer Definition
SXTP02F ------------------ Define Fields in a Buffer ------- Row 1 to 18 of 20 Command ===> Scroll ==> CSR (Types are Str, Text, Pdec, Updec, Zdec, Uzdec, Ubin, Bin, Float, Opa) Buffer Id ===> BUFFER-BYTES Maximum Size ===> 0 Sel Type Start Len Dec Name - ------ ------- ------- - --------------------------------------------- OPA 0 10000 0 DATA
- Setup Conversion Rule
SXTP03F --------- Define Msg-Field / Buffer-Field Conversion - Row 1 to 1 of 1 Command ===> Scroll ==> CSR Conversion Id ===> CVR-BYTES Using Message ...: MESSAGE-BYTE Using Buffer ...: BUFFER-BYTES Max Buffer Size ===> 0 Trunc Reqd BfFld Msg Field | Num Buffer Field - - ----- ------------------------ | ---- ----------------------------- Y Y 1 DATA | 1 DATA ******************************* Bottom of data *******************************
SXTP03 ----------------------- Conversion Rules ------------ Row 1 to 14 of 14 Command ===> Scroll ==> CSR (ADD=Create new Conversion Rule, CAN=Cancel updates, F=Find) (Use line cmd 'M' to relate Message fields to conversion rules) Max EMS S Sel Flds Bufsz Type Z Conversion Id Message Id Buffer Id - ---- ------- ---- - ---------------- ---------------- ---------------- 1 0 M M CVR-BYTES MESSAGE-BYTE BUFFER-BYTES
- Setup Recipe
SXTP05N ----------------------- Recipe Details -------------------------------- Command ===> (CICS,IMS,EMS,PROP,SEL) Recipe Identifier ===> CONTAINER-NOCVR Listen To ===> YOUR.INPUT.DESTINATION Reply To ===> Reply To Always ===> N Error Subject ===> tibss.error.out Error Threshold ===> 0 (0 - 99999) Error Percentage ===> 0 Reply To Len (Dyn) ===> 0 Start ===> 0 Usage Limit ===> 0 Input Conversion (?) ===> CVR-BYTES (SEE CICS OPT FOR NO CONVERSION) Output Conversion(?) ===> Back End System (?) ===> Interface-CICS BES2(?): BES3 (?) ===> BES4(?): ESB Endpoint (?) ===> EMS-SERVER SS-Id Filter: N (N or Y) Resource Name ===> YOURPGM Method of Invocation ===> 10 2 DPL 3 PGM 9 DPL MRO 12 DPL TSQ DPL > 32K Invocations 10 Container 11 Storage 5 TDQ Write 6 TSQ Write 8 Command 4 Task/IMS Tran 7 IMS Conversational Tran Trace Level ===> 0 0-5 (Debugging) Reply Method ===> 3 0 None 2 Message 1 Status 3 Both Status and Message
SXTP05E ---------------- EMS Recipe Details Extension ------------------------- Command ===> Recipe Identifier ===> CONTAINER-NOCVR Input Dest Type ===> Q Name: YOUR.INPUT.DESTINATION Output Dest Type ===> Q Name: Error Dest Type ===> Q Name: tibss.error.out Durable Subscriber ===> N (N/Y) Durable Client Id ===> (Service Levels G=Guaranteed, R=Reliable) SMSL Mode ===> RN (RA Auto-Ack, RN No-Ack, GA All, GS SS Recv) Delivery Mode ===> R (P Persistent, N Non-Persistent, R Reliable) Output Message properties: Priority ===> N (N/Y) Value ===> 4 (0 - 9) Expiration ===> N (N/Y) Value ===> 0 Unit ===> S (S,M,H,D) Compression ===> N (N/Y) Preserve ===> N (N/Y, undelivered messages) Body Trace ===> N (N/Y) Message Type ===> B M(ap)/S(tream)/T(ext)/B(ytes) Copy JMSCorrelation ===> N N(o)/Y(es)/E(nvelope)/M(sgId)/W(CorId or MsgId)
Note: User Message Type “B” (bytes output message) which is the most efficient for conversion-less output, or "T" for text if the input message is an EMS text message.SXTP05I -------------------- CICS Service Details ------------- Command ===> Recipe Identifier ===> CONTAINER-NOCVR Resource Name ===> YOURPGM Method of Invocation ===> 10 Method of Reply ===> 3 Mirror Transaction ===> Default SXEX CSMI User Transaction ===> N N/Y Container (CTN) Extended Options Channel Name ===> Channel-You-Want Single CTN Name ===> Container-Name-You-Want Container Invocation ===> P P/T - Program / Transaction Container Process ===> M S/M Single CTN, Message FWD Destination Names ===> N N/Y as Containers Remote Region Execution Transaction Id ===> System Name ===> Multi-Execution Resource 2: 3: 4: 5:
-
What will happen next
- Producer will send a Bytes JMS message to “YOUR.INPUT.DESTINATION” (topic or queue based on recipe) with:
- Substation ES will receive your message (input message)
- Substation ES will get a buffer size slightly larger than the JMS Bytes message size
- Substation ES will send the buffer to CICS
-
Substation ES CICS program SXCOSRVG or SXCO#RED will:
- Your program should clear all containers from channel and create a new one with the output data for which the size does not matter
- Your program should issue an “EXEC CICS RETURN”
- Substation ES CICS program SXCOSRVG or SXCO#RED will:
-
Substation ES will take your output data and do the following:
- Example of EMS messages
- Input Message
message=BytesMessage={ Header={ JMSMessageID={ID:ZLINUX-EMS-TEST.80475AB2E0F15:5} JMSDestination={Queue[YOUR.INPUT.DESTINATION]} JMSReplyTo={Queue[YOUR.reply.DESTINATION]} JMSCorrelationID={null} JMSType={null} JMSTimestamp={Mon Apr 02 13:25:08 CDT 2018} JMSDeliveryTime={Mon Apr 02 13:25:08 CDT 2018} JMSExpiration={0} JMSPriority={4} } Properties={ JMSXDeliveryCount={Integer:1} } Bytes={100 bytes} }
- Output Message (response)
message=BytesMessage={ Header={ JMSMessageID={ID:ZLINUX-EMS-TEST.80475AB2E0F15:5} JMSDestination={Queue[YOUR.reply.DESTINATION]} JMSReplyTo={null} JMSCorrelationID={null} JMSType={null} JMSTimestamp={Mon Apr 02 13:25:08 CDT 2018} JMSDeliveryTime={Mon Apr 02 13:25:08 CDT 2018} JMSExpiration={0} JMSPriority={4} } Properties={ JMSXDeliveryCount={Integer:1} tibss-status={Integer:0} } Bytes={100000 bytes} }
- Input Message
Copyright © Cloud Software Group, Inc. All rights reserved.