Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Using the JES XCF exits z/OS MVS Programming: JES Common Coupling Services SA23-1387-00 |
|||||||||||||||||||||||
As noted previously, there are a number of restrictions placed on the use of the JES XCF macros and their use in specific exits or JES3 DSPs. Remember, only two of the JES XCF macros (IXZXIXAT and IXZXIXDT) can be used in a JES XCF exit (IXZXIT03). All other JES XCF macros are for your use in standard JES exits and JES2 DSPs only. To illustrate an attach, send, receive, detach scenario, refer
to Figure 1, which presents the
overall flow between two JES members of the same JES XCF group. The
example presented here shows the steps both JES members MCR and POK take to communicate. The figure shows the macros
invoked, the exits used, and the basic flow for an entire asynchronous
acknowledgement message cycle. Following Figure 1 is sample code for each step.
Figure 1. Example of using JES XCF macros and exits
for an ASYNCACK message cycle
The following numbered steps describe the events in Figure 1.
Steps A and B (member attach) and steps C and D (member detach) are provided in the following series of macro coding examples for completeness. It is not the intention to suggest that you would ever attach members, send a single message, and then immediately detach members.
Member MCR attaches to JES XCF group IBMVSLAB. The group token is returned in field MCRGTOKE.
Member POK attaches to JES XCF group IBMVSLAB. The group token is returned in field POKGTOKE.
Member MCR builds mailbox MCR␢MAILBOX. Field POSTXIT contains the address of the POST exit routine. Field POSTDATA contains the address of a data area passed to the POST exit routine.
Member POK builds mailbox POK␢MAILBOX. Field POSTXIT contains the address of the POST exit routine. Field POSTDATA names the field that contains the address of a data area passed to the POST exit routine.
Member MCR sends an ASYNCACK message to member POK's mailbox (POK␢MAILBOX). Field TOMESSAGE contains the address of the message being sent. REQTOKEN defines a field to contain a token returned by send message processing to associate the message acknowledgment with this message. The acknowledgement is to be returned to MCR␢MAILBOX. 4 Exit IXZXIT01 is invoked on member MCR to modify the message before delivery to POK␢MAILBOX.
The message is sent to member POK. The POST exit routine posts member POK, which then receives the ASYNCACK message from POK␢MAILBOX. Field DATA contains the address of the message to be received. MSGTOKEN defines a field to contain the token member POK is to use to associate its acknowledgement with this message. 6 Exit IXZXIT02 is invoked on member POK to modify the message before delivery to POK.
Member POK acknowledges the ASYNCACK message from member MCR. POK uses the message token returned in MTOKEN to identify the message being acknowledged. The user return code (USERRC) provides a return code to the sender of the original message (member MCR). 8 Exit IXZXIT01 is invoked on member POK to modify the acknowledgement.
The message is sent to member MCR. The POST exit routine posts member MCR, which then receives the acknowledgement in MCR␢MAILBOX. JES XCF places the address of the acknowledgement in field ACKMSG. The message token, which member POK used to associate the acknowledgement with the message, is returned in field MTOKEN. 10 Exit IXZXIT02 is invoked on member MCR to modify the acknowledgement before delivery to MCR.
Member MCR acknowledges the acknowledgement from POK. MCR uses the message token returned in field MTOKEN to identify the acknowledgement that is being acknowledged. In this example, the two JES members have completed their communication and each could detach from the JES XCF group. Remember, a detach is accomplished only through exit IXZXIT03, and exit IXZXIT03 gets control only during JES initialization and termination. This detach code is not called while the JES address space remains active.
Member MCR detaches from JES XCF group IBMVSLAB.
Member POK detaches from JES XCF group IBMVSLAB. |
Copyright IBM Corporation 1990, 2014
|