After CICSPlex® SM workload management processing, the WTRA_RESPONSE field contains a return code of either zero (0) or 8. If the return code is 0, WTRA_SYSID contains the SYSID of the selected target region, and WTRA_APPLID contains its APPLID. With that information, you can proceed to route the unit of work to the target region.
If the return code is 8, you should inspect the WTRA_API_RESP and WTRA_API_REAS fields for more information. These fields contain the last response and reason codes returned to the CICSPlex SM workload management routing action module (EYU9WRAM). In most cases, the response and reason codes describe what caused CICSPlex SM workload management to generate the return code of 8. Based on that information, you can decide how to proceed.
In some cases, however, the WTRA_RESPONSE field may contain a return code of 8, while the WTRA_API_RESP and WTRA_API_REAS fields have not been set by CICSPlex SM workload management. In those cases, an error was detected prior to invoking the routing action process. CICSPlex SM user trace records are written to the CICS® trace data set for those types of errors. When this happens, your program should terminate processing.
When the return code is 8, you should also inspect the WTRA_OPTER field. If its value is WTRA_CALLYES:
If the WTRA_OPTER field contains a value of WTRA_CALLNO, terminate further processing for the proposed unit of work.
After the unit of work has completed in the target region, set the WTRA_FUNC field according to how the unit of work completed. If the unit of work completed successfully:
If the unit of work abended or generated an error that you consider abnormal:
After you receive the SYSID and APPLID of a target region, you can attempt to route the unit of work to the target region. However, the routing attempt may result in an error condition if the system is unavailable. When this happens, you should:
CICSPlex SM workload management provides another target from the scope list, if possible. If no other systems are available, the WTRA_RESPONSE field is set to 8 and the WTRA_API_RESP and WTRA_API_REAS fields describe the reason for the failure. You may have to invoke CICSPlex SM workload management more than once for routing errors until you receive a valid target region.
If the WTRA_TRANID, WTRA_USERID and WTRA_LUNAME fields cause CICSPlex SM workload management to select a transaction group that includes an affinity, the rules of transaction affinities are obeyed. In this case, you should ensure that the WTRA_NEXTTRAN field is initialized with the ID of the next transaction before calling the route termination function.
If your units of work, or any subset of them, have an affinity relation defined, be careful in how you define that affinity. Since your program cannot provide SIGNOFF or LOGOFF processing, an affinity lifetime of SIGNON or LOGON, though valid, may cause an affinity relation to be built that is not removed until either the requesting region or the target region terminates.
The WTRA_NEXTTRAN field is most useful for pseudoconversation affinities. For this affinity lifetime, CICSPlex SM workload management normally issues the EXEC CICS ASSIGN NEXTTRANSID command to retrieve the next transaction ID, if any, for the facility. Since that command is not available when CICSPlex SM workload management is invoked by your program, it is your responsibility to provide the ID of the next transaction.
For a description of CICSPlex SM workload management affinity processing, see Taking affinity relations into consideration. For details on specifying affinity relation and lifetime values, see Creating a transaction group.
If the target region is running CICS/ESA 4.1 and later, transactions initiated by your program can participate in abend compensation processing, provided that the active CICSPlex SM workload specifies it. You should note that, if the work requests are either non-terminal-related EXEC CICS START comands, or BTS activities, the routing and target regions must be within the same MVS™ image for the routing region to detect that an abend has occurred.
Your program should notify CICSPlex SM workload management that a particular unit of work abended by specifying WTRA_FUNCABD in the WTRA_FUNC field. Then, if possible, CICSPlex SM workload management will tend to avoid selecting the same target region for the transaction (or set of transactions, if an affinity is defined) on subsequent route select functions.
For a description of CICSPlex SM workload management abend compensation processing, see Taking abend probabilities into consideration. For details on requesting abend compensation, see Creating a WLMSPEC specification.
If the MVS image where your program is running operates in GOAL mode, transactions initiated by your program can be processed using the goal algorithm, provided the active CICSPlex SM workload specifies it. Because the service class token is not known and may not exist for a specific route select function, CICSPlex SM workload management uses a pseudo-service class token for all transactions initiated by your program. CICSPlex SM assumes that transactions in that service class always meet their goal.
For details on requesting the GOAL algorithm, see Creating a WLMSPEC specification.
If your program issues an EXEC CICS LINK for EYU9XLOP, but the requesting region in which your program is running has not yet fully connected to its target CMAS, you will see message EYUXL0020I, indicating that an ESSS connection is in progress. Your program will wait indefinitely until the CMAS becomes available and the requesting region is joined to a workload. If you have connected successfully to the CMAS and the MAS, but the CMAS has not installed any workload definitions to the MAS, you will see a message indicating that the requesting region is waiting for a workload. You may need to set up and install workloads to rectify this situation. Note that, once the requesting region has successfully connected to the CMAS, the CMAS can become inactive and workload management remains active.