Processing

The processing that the program needs to perform is listed.

About this task

Be aware of the following programming notes:
  • The z/OS® Communications Server commands should be synchronous, to avoid the use of exits (OPTCD=SYN).
  • Take care not to run the program for an APPLID of a running CICS®. If you do, and you are using z/OS Communications Server persistent sessions, a predatory takeover will occur; that is, your program will assume control of the sessions belonging to the APPLID.

VTAM® is the previous name for z/OS Communications Server

Programming notes:
  1. The z/OS Communications Server commands should be synchronous, to avoid the use of exits (OPTCD=SYN).
  2. Take care not to run the program for an APPLID of a running CICS. If you do, and you are using z/OS Communications Server persistent sessions, a predatory takeover will occur; that is, your program will assume control of the sessions belonging to the APPLID.

Procedure

  1. Reserve storage for the following:
    • The ACB of the failed sysplex member. The following example assumes that you are using persistent sessions:
      acb-name ACB AM=VTAM,
                   PARMS=(PERSIST=YES)
    • The RPL, which is required by the z/OS Communications Server macros:
      rpl-name RPL   AM=VTAM,OPTCD=(SYN)
    • The NIB, which is required by the CHANGE OPTCD=ENDAFFIN macro:
      nib-name NIB
  2. Issue a VTAM OPEN command for the ACB of the member that owns the affinity, passing the input APPLID for this member.
  3. If any sessions persist, use the VTAM SENDCMD macro to terminate them. If you are not using persistent sessions, this is not necessary.
    1. Move the following command to an area in storage. In this example, applid1 is the member name of the failed member and applid2 is the APPLID of the partner system.
      'VARY NET,TERM,LU1=applid1,LU2=applid2,TYPE=FORCE,SCOPE=ALL'
    2. Issue the SENDCMD macro, as in the following example. In this example:
      • rpl-name is the name of an RPL.
      • acb-name is the ACB of the failed sysplex member.
      • output-area is the name an area in storage where the VARY command is held.
      • command-length is the length of the command.
      SENDCMD  RPL=rpl-name,
         ACB=acb-name,
         AREA=output-area,
         RECLEN=command-length,
         OPTCD=(SYN)
  4. Use the VTAM RCVCMD macro to receive messages from z/OS Communications Server. RCVCMD must be issued three times after the SENDCMD to be sure that the VARY command worked correctly. In the following example:
    • rpl-name and acb-name are as described previously.
    • input-area is the area of storage into which the message is to be received.
    • receive_length is the length of data to be received.
    RCVCMD  RPL=rpl-name,
       ACB=acb-name,
       AREA=input-area,
       AREALEN=receive-length,
       OPTCD=(SYN,TRUNC)
  5. Issue this command twice more to make sure of receiving all the output from z/OS Communications Server.
  6. Issue the VTAM CHANGE OPTCD=ENDAFFIN macro to end the affinity. Before issuing the macro, the following fields must be initialized in the NIB:
    • NIBSYM is set to the APPLID of the partner system.
    • NIBGENN is set to the generic resource name of the failed system.
    • NIBNET is set to the NETID of the partner system.
    CHANGE  RPL=rpl-name,
            ACB=acb-name,
            NIB=nib-name,
            OPTCD=(SYN,ENDAFFIN)
  7. Issue the VTAM CLOSE command for the ACB.


dfht1c00109.html | Timestamp icon Last updated: Sunday, 4 June 2017