Example
Operation: Receive the results for a message sent through
the IXCSEND macro. This unit of work is to be suspended until all
of the expected responses have arrived. All results for the message
are to be gathered at once. MTOKEN contains the token of the message
to be received. Register 2 points to the area where XCF is to store
the status metadata of the results. Register 3 points to the area
where XCF is to store the response data. XCF is to store the return
code and reason code into variables RETURN and REASON. The code is
as follows:
LA R2,MYAA
LA R3,MYDA
IXCRECV MSGTOKEN=MTOKEN,RECEIVE=RESPONSES,REQTYPE=BLOCKING, X
SCOPE=ALL,ANSAREA=(R2),ANSLEN=AALEN,DATAAREA=(R3), X
DATALEN=DALEN,RETCODE=RETURN,RSNCODE=REASON,MF=S
MYAA DS CL1024 AREA TO PLACE THE METADATA
MYDA DS CL4096 AREA TO PLACE THE RESPONSE DATA
RETURN DS 1F RETURN CODE
REASON DS 1F REASON CODE
AALEN DC F'1024' LENGTH OF THE ANSWER AREA WHERE STATUS X
METADATA IS PLACED
DALEN DC F'4096' LENGTH OF THE DATA AREA WHERE RESPONSE X
DATA IS PLACED