# Invoking Multiple Resources

The Invoke Multiple CICS Resources feature allows one RV or EMS message received by Substation ES to produce up to five similar invocations to different resources in a CICS address space.

Substation ES listens to an RV subject or an EMS destination as a normal recipe service does. When the recipe service has multiple resources defined, this service synchronously processes multiple CICS invocations using the same data content. Up to four additional resource fields or a total of five resources can be used. This allows the Substation ES CICS interface to run up to five transactions, all with the same characteristics and user payload.

To invoke multiple resources, the recipe service must meet these qualifications:

- Message type is RV or EMS.
- For EMS message types:
  - MAP, BYTES, and TEXT message types are supported.
  - EMS Recipe Limit is not supported.
  - The `tibss-BES` property is supported.
- Method of Reply must be specified as zero (0) - NONE.
- The same conversion rule is used for all invoke resources.
- Alt-BES is supported.
- The `tibss-resource` property can be used to change first resource value. Additional resources are executed as specified in the recipe service.
- Method of Invocation is one of the following:
  - 2 DPL
  - 3 PGM
  - 4 Task
  - 5 TDQ Write
  - 6 TSQ Write

Note: This feature cannot be used in conjunction with the multi-container feature. That is, multi-execution of multiple containers resources is not supported.

The presence of Resource 2 through 5 in the recipe indicates additional CICS invocations. The resources are executed serially. If a transaction for a resource abends, Substation ES records the error and does not execute other resources that might still be eligible.

Substation ES does not stop the resources from executing until they are either completed successfully or the business process abends. If the business process simply returns an error indicator in the return message, Substation ES does not recognize that and continues processing the other resources. To stop the multi-resource execution, the business process must abend or receive an error indicator from `EXCI`.

The following example demonstrates how to set up a recipe service that invokes multiple CICS resources. The recipe service invokes the `SXC3I001` program three times and the `SXCCI001` program twice.

    -------------------------------- Recipe Details --------------------------------
    Command ===>                                          (CICS,IMS,EMS,PROP,SEL)

     Recipe Identifier      ===> SXC-DPL-MULTI-EXEC
     Listen To              ===> tibss.CICS.Multi.Exec.Request
     Reply To               ===>
       Reply To Always      ===> Y
     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-I-BYTE         (SEE CICS OPT FOR NO CONVERSION)
     Output Conversion(?)   ===> CVR-O-BYTE
     Back End System  (?) ===> Interface-CICS     BES2(?):
                BES3  (?) ===>                    BES4(?):
     ESB Endpoint     (?)   ===> EMS-SERVER          SS-Id Filter: N (N or Y)
     Resource Name          ===> SXC3I001
     Method of Invocation   ===> 2    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           ===> 0  0 None      2 Message
                                    1 Status    3 Both Status and Message

    ---------------------------- CICS Service Details ------------------------------
    Command ===>

     Recipe Identifier      ===> SXC-DPL-MULTI-EXEC
     Resource Name          ===> SXC3I001
     Method of Invocation   ===> 2 Method of Reply ===> 0

     Mirror Transaction     ===>     Default SXEX
     CSMI User Transaction  ===> N   N/Y
     Container (CTN) Extended Options
     Channel Name           ===>
     Single CTN Name        ===>
     Container Invocation   ===> P P/T - Program / Transaction
     Container Process      ===> S S/M Single CTN, Message
     FWD Destination Names  ===> N N/Y as Containers

     Remote Region Execution
     Transaction Id         ===>
     System Name            ===>

     Multi-Execution
          Resource 2: SXC3I001   3: SXC3I001  4: SXCCI001  5: SXCCI001

Copyright © TIBCO Software Inc. All rights reserved.