z/OS MVS Programming: Sysplex Services Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Starting the client

z/OS MVS Programming: Sysplex Services Guide
SA23-1400-00

A client and server can devise many ways to notify the other of its existence and availability. In this example, the client is going to use the results returned from the XCF Server to determine if a server name is defined in the sysplex. If the server of interest is defined and active, the client begins sending server requests.

The client is started by a batch job or started task. The client begins by finding out which servers are defined in the sysplex. The client uses the IXCREQ macro to format a request message for the XCF Server to process, then sends the message to the XCF Server using the IXCSEND macro:

  1. The client issues IXCREQ to format a server request message for the XCF Server and asks for information (REQUEST=SERVERINFO) about all servers defined to XCF in the sysplex:
    LIST IXCREQ MF=(L,REQPL),PLISTVER=0
    
    FORMAT IXCREQ MF=(M,REQPL),REQUEST=SERVERINFO,LISTALL
  2. Using the output from the IXCREQ macro, the client issues IXCSEND to send the request to the XCF Server:
    SEND     IXCSEND SENDER=ClientSender,                                   X
                    SENDTO=SERVER,                                          X
                    FUNCTION=ServFunc,                                      X
                    DESCRIPTION=ClientDesc,                                 X
                    MSGID=ClientMsgID,SERVER=XcfServer,                     X
                    SYSTEMS=ALL,MSGDATA=REQPL,                              X
                    MSGLEN=REQPLL,                                          X
                    HOLDTIME=ClientHoldTime,                                X
                    RESPTIME=ClientRespTime,                                X
                    EXPECTREPLY=YES,                                        X
                    RETMSGTOKEN=ClientMsgToken,                             X
                    RETCODE=RC,RSNCODE=RSN                                   
    
     XcfServer DC A(IXCYSRVR_SNAME1,IXCYSRVR_SNAME2,IXCYSRVR_SName3,IXCYSRVR*
                    _SName4,C'    ',C'    ',C'    ',C'    ')
     
     ServFunc  DC A(IXCYSRVR_SFunc1,IXCYSRVR_SFunc2)            
  3. To receive the responses from the XCF Server, the client issues IXCRECV. XCF on the client system will suspend the client task until all expected responses from XCF Servers are received or the RESPTIME expires:

    RECEIVE  IXCRECV MSGTOKEN=ClientMsgToken,RECEIVE=RESPONSES,        X
             REQTYPE=BLOCKING,SCOPE=ALL,                               X
            ANSAREA=RecvAnsArea,ANSLEN=AnsAreaSize,                   X
           DATAAREA=RecvDataArea,DATALEN=DataAreaSize,               X
            RETCODE=RC,RSNCODE=RSN    

When control returns, the client processes the results found in the ANSAREA and DATAAREA. Using the information returned by the XCF Server, the client is able to determine if the server of interest (for example, MYSERVER) is defined and available to receive requests and proceed based on its findings

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014