z/OS MVS Programming: Workload Management Services
Previous topic | Next topic | Contents | Index | Contact z/OS | Library | PDF


Example of Using the Sysplex Routing Services

z/OS MVS Programming: Workload Management Services
SC34-2663-00

Example of Using the Sysplex Routing Services

Figure 23 shows an example of the sysplex routing services.

Figure 23. Example of using sysplex routing services
REQTEXT

In the figure, there are three servers, and one client program. Each of the servers registers at address space initialization using the IWMSRSRG macro. Suppose the first server registered, with the following defined:

LOCATION1  DS    CL18         location
NETWORKID1 DS    CL8          network id
LUNAME1    DS    CL8          LU name
STOKEN1    DS    CL8          token of server address space

The first server uses the IWMSRSRG macro as follows:

IWMSRSRG LOCATION=location1,
         NETWORK_ID=networkid1,
         LUNAME=luname1,
         STOKEN=stoken1

Meanwhile, the client program wants the list of address spaces available for processing work. The client issues IWMSRSRS once for the length of the area required for the list. The length required is in the QUERYLEN output parameter. The client issues:

IWMSRSRS SYSINFO_BLOCK=sysinfo_block,
         ANSLEN=anslen,
         QUERYLEN=querylen,
         LOCATION=location
Note:
The QUERYLEN value is a snapshot taken when IWMSRSRS is issued. That value can change between calls due to other servers registering. To compensate, it is recommended that you add a few entries extra length to the size resulting from the first IWMSRSRS call.

The client then obtains the required amount of storage, and issues IWMSRSRS again for the list of eligible servers and their weights:

IWMSRSRS SYSINFO_BLOCK=sysinfo_block,
         ANSLEN=anslen,
         QUERYLEN=querylen,
         LOCATION=location

The caller receives the list, mapped by IWMWSYSR, as follows:

  Server               Weight
  ------               ------
  NETID3.LUNAME3          4
  NETID1.LUNAME1          6
  NETID2.LUNAME2          2

The client routes the first 4 work requests it receives to NETID3.LUNAME3, the first in the list. The client routes the next 6 requests to NETID1.LUNAME1, and then the following 2 to NETID2.LUNAME2. The client opted to issue the IWMSRSRS macro every three minutes. Once the client has received 12 requests, it will route the 13th through the 16th requests to NETID3.LUNAME3, and go down the list again until the three minutes are over.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014