In a two-system HA environment, one system acts as the production system and the other acts as the backup system. Users only interact with the production system, and replication keeps the backup system synchronized with the production system. Any changes made to the production system are automatically replicated on the backup, provided you've defined rules for replication and the data has been frequently synchronized.

A role swap (which can be planned or unplanned) switches the perspective and flow of data. For example, let's say A is the production system and B is the backup system. If a role swap is triggered, B then acts as the production system and A (when available) acts as the backup system.

A full role swap takes the longest of the role swaps, but it exercises role swaps in both directions on both systems. Any user data changes made during the role swap are preserved.

Before you begin:

Do the following before you perform a full role swap.

  • Read the Role Swap User Guide. There are several steps you must take to ensure your data is replicated and up-to-date.

  • Contact Technical Support to ensure everything is ready on both systems. They'll guide you through the process and make sure the role swap completes successfully.

  • The role swap must be run with a QSECOFR-like profile.

  • Decide whether you want to run the role swap interactively or in batch:

    • If running interactively, you must be signed on to the system console.

    • If running in batch, the role swap should be running on a job queue in the controlling subsystem (QBASE or QCTL, for example).

  • If *SWAPIP is listed as the role swap type in the Initialize Robot HA (INZRSFHA) command, the system will IPL to allow the system name to change.

To perform the role swap:

Note: Make sure all users are signed off the production system. It's also important to verify that all synchronization jobs are complete and any subsystems or jobs associated with the production system are shut down.

On the production system:

  1. Sign off the system and sign back on prior to running the role swap. This releases any locks you might have from working in the product.

  2. Execute the following commands to check RBTHALIB and RSFUSER for object locks:

    WRKOBJLCK OBJ(RBTHALIB) OBJTYPE(*LIB)

    WRKOBJLCK OBJ(RSFUSER) OBJTYPE(*LIB)

    If there are locks, take option 4 to remove them.

  3. Select option 7, Role Swap Menu from the Robot HA Main Menu. Then, select 10, Role Swap.

  4. Do the following on the Role Swap to Backup panel:

    1. Choose whether you want to run the role swap from the system console, or specify *YES for Run in batch to submit the job to a job queue.

      Either choice will bring your system down into restricted state.
    2. If you want to flag the role swap as a test run, change Set test flag to *YES. Otherwise, leave the default as *NO. The option *NOCHG will use the value specified during the last role swap (this is helpful if your role swap needs to be restarted).

      Specifying *YES allows you to run different system startup programs, since it's flagged as a test role swap instead of a real one.
    3. Specify *YES for Are you sure?, otherwise the role swap won't proceed.

    4. Press Enter. This swaps the production system to the backup role.

  5. After submitting the role swap, watch for messages in the following places:

    • If running interactively, the messages will show up on the screen or in your interactive joblog.

    • If running in batch, watch for messages in QSYSOPR until the swap completes successfully.

      Because running the role swap in batch sends you into restricted state, you will lose your interactive session and need to wait until the system comes out of restricted state to see the current progress of the role swap.
  6. Then, ensure the server has started and subsystem RSFUSER/RSFHA is active. You may need to start them manually.

    • To check the server, navigate to the Control Menu and view the "Robot HA is" status.

    • To check the subsystem, execute the WRKSBS command and look for RSFHA in the list of subsystems.
  7. Job queue RSFUSER/RSFHA is automatically placed on hold after a role swap. To resume synchronization, release the job queue by executing the RLSJOBQ RSFUSER/RSFHA command.

On the backup system:

Repeat steps 1-6 above on the backup system to swap it to the production role.

When all steps in the role swap have been followed, users can sign back on and resume working. The systems should now be swapped, with the production system in the backup role and the backup system in the production role.

If you want to synchronize your changes to the production system during your swap, navigate to the Monitor Menu and take option 4 to see if the sync jobs have been submitted. If they haven't, navigate to the Control Menu and take option 3.

To end the role swap:

Note: Make sure all users are signed off the system in the production role.

On the system in the production role:

  1. Sign off the system and sign back on prior to running the role swap. This releases any locks you might have from working in the product.
  2. Execute the following commands to check RBTHALIB and RSFUSER for object locks:

    WRKOBJLCK OBJ(RBTHALIB) OBJTYPE(*LIB)

    WRKOBJLCK OBJ(RSFUSER) OBJTYPE(*LIB)

    If there are locks, take option 4 to remove them.

  3. Select option 7, Role Swap Menu from the Robot HA Main Menu. Then, select 10, Role Swap.

  4. Do the following on the Role Swap to Backup panel:

    1. Choose whether you want to run the role swap from the system console, or specify *YES for Run in batch to submit the job to a job queue.

      If you choose to run in batch, the system will be brought down into restricted state.
    2. Specify *YES for Are you sure?, otherwise the role swap won't proceed.

    3. Press Enter. This swaps the system back to the backup role.

  5. After submitting the role swap, watch for messages in the following places:

    • If running interactively, the messages will show up on the screen or in your interactive joblog.

    • If running in batch, watch for messages in QSYSOPR until the swap completes successfully.

      Because running the role swap in batch sends you into restricted state, you will lose your interactive session and need to wait until the system comes out of restricted state to see the current progress of the role swap.
  6. Then, clear job queue RSFUSER/RSFHA.

  7. Ensure the server has started and subsystem RSFUSER/RSFHA is active. You may need to start them manually.

    • To check the server, navigate to the Control Menu and view the "Robot HA is" status.

    • To check the subsystem, execute the WRKSBS command and look for RSFHA in the list of subsystems.
  8. Job queue RSFUSER/RSFHA is automatically placed on hold after a role swap. To resume synchronization, release the job queue by executing the RLSJOBQ RSFUSER/RSFHA command.

On the system in the backup role:

Repeat steps 1-7 on the system in the backup role to swap it to production.

On both systems:

Take option 1 on the Control Menu to start the servers, then take option 3 to resume synchronization.

When all steps in the role swap have been followed, users can sign back on and resume working. The systems should be in their normal roles again.


Still have questions? We can help. Submit a case to Technical Support.

Last Modified On: March 08, 2018