Using EXITs in BRMS

When using BRMS control groups (WRKCTLGBRM), it is possible to add user commands using the *EXIT option for the backup item. These commands can be used to run many different things, start applications, etc.

First and Last *EXIT

If used, these are processed outside of the control group. The first *EXIT is the pre-control group exit that runs before any of the control group attributes are run (signing off users, ending subsystems, holding job queues, and so on).  The last *EXIT is the post-control group and is run after all entries in the control group have been run.

Processing Before the Save

BRMS performs the following operations in the indicated order when you run a restricted state backup control group:

  1. Process the first control group entry if it is *EXIT.
  2. Sign off interactive users, if requested.
  3. Hold job queues, if requested.
  4. End Lotus servers, if requested.
  5. End TCP/IP servers, if requested.
  6. Wait for end server wait time to expire, if Lotus or TCP/IP servers ended.
  7. End subsystems, if requested.
  8. Vary off Windows Integrated servers, if requested.
  9. Vary off hosted logical partitions, if requested.
  10. Process each control group backup item in sequence.

NOTE:  BRMS also checks for an active backup item in the control group before ending any subsystems. If there are no active items to be saved, any subsystems or job queues specified under Option 9 or 10 from the WRKCTLGBRM screen will not be processed.

Processing After the Save (without IPL and *SAVSYS)

BRMS performs the following operations in the indicated order after processing the backup control group when the entries do not include a *SAVSYS and when an IPL has not been requested: 

  1. Save the media information, if requested.
  2. Release job queues, if requested.
  3. Start subsystems, if requested.
  4. Process the last control group entry, if it is *EXIT.
  5. Vary on Windows Integrated servers, if requested, and subsystems are started.
  6. Vary on hosted logical partitions, if requested, and subsystems are started.
  7. Start Lotus servers, if requested, and subsystems are started.
  8. Start TCP/IP servers, if requested, and subsystems are started.
  9. Run BRMS maintenance, if requested.

Processing After the Save (with IPL)

BRMS performs the following operations in the indicated order after processing the backup control group items when an IPL has been requested:

  1. Save the media information, if requested.
  2. Process the last control group entry, if it is *EXIT.
  3. Run BRMS maintenance, if requested.
  4. Perform the IPL, if requested, and check subsystems are not started.

Processing After the Save (with *SAVSYS and no IPL)

BRMS performs the following operations in the indicated order after processing the backup control group items when the entries included a *SAVSYS and an IPL has not been requested:

  1. Save the media information, if requested.
  2. Start the controlling subsystem (if not inhibited by Subsystems to process).
  3. Release job queues, if requested.
  4. Process the last control group entry, if it is *EXIT.
  5. Vary on Windows Integrated servers, if requested, and subsystems are started.
  6. Vary on hosted logical partitions, if requested, and subsystems are started.
  7. Start Lotus servers, if requested, and subsystems are started.
  8. Start TCP/IP servers, if requested, and subsystems are started.
  9. Run BRMS maintenance, if requested. 

The following steps are recommended when using an *EXIT in a BRMS control group:

  1. Users should not be using BRMS control group exits to replace Control Language Programs (CLP) such as using multiple *EXITS to run different interactive CL commands.  Because BRMS does not check if the previous *EXIT completed successfully, it is recommended that a CL program (CLP) is created and this CLP be called from an *EXIT. Using a CLP allows more control of multiple CL commands and monitoring for success or failure.
  2. Do not use any of the following BRMS commands interactively in an *EXIT in a control group. Results will be unpredictable.

        NOTE: Although not recommended, it may be possible to use some of the commands, STRBKUBRM SBMJOB(*NO), STRMNTBRM, MOVMEDBRM in the last exit of a control group but this may result in inconsistent results. 

  • SAVBRM 
  • SAVDLOBRM
  • SAVFLRLBRM
  • SAVLIBBRM
  • SAVMEDIBRM
  • SAVOBJBRM
  • SAVOBJLBRM
  • SAVSAVFBRM
  • SAVSYSBRM
  • DUPMEDBRM
  • STRMNTBRM
  • STREXPBRM
  • MOVMEDBRM
  • INZMEDBRM
  • RSTAUTBRM
  • RSTBRM   
  • RSTDLOBRM
  • RSTLIBBRM
  • RSTOBJBRM
  • STRBKUBRM SBMJOB(*NO)

      3. Do not use any native OS/5 save or restore commands in a *EXIT in a control group.
    
      4. Using commands listed in points 2 and 3 in a CLP that is called interactively and then calling the CLP from the *EXIT is the same as calling the command itself.

      5. Running multiple STRBKUBRM SBMJOB(*YES) one after each other.  It is recommended to create a CLP and have that CLP start each control group with delays. Then call the CLP from the job scheduler or *EXIT in a control group.
    
   NOTE:  If the system is in restricted condition and a job is submitted to a subsystem that is not up, the system will automatically start subsystem QCTL which will start subsystems and the startup program will be run.

      6. SAVDOMBRM has to run in an *EXIT in a control group; however, it cannot be the first or last *EXIT.


Examples

All sequences are exits. As there are no BRMS backup items, option 9 and 10 from the control group will not run.   

10  *EXIT       CALL PGM(ALIB/APGM)

20  *EXIT       DLYJOB DLY(120)

30  *EXIT       SAVLIB LIB(ANYLIB)

40  *EXIT       CALL PGM(BLIB/BPGM)  

In this example, if the control group is run on any day other than Friday, option 9 and 10 from the control group will not do anything:                                      


                                Weekly  
     Backup     List ASP         Activity
Seq  Items      Type Device      SMTWTFS

  10 *EXIT                       *DFTACT
 20 ALIB                             F  
 30 *EXIT                       *DFTACT

Privacy Policy | Cookie Policy | Impressum
From time to time, this website may contain technical inaccuracies and we do not warrant the accuracy of any posted information.
Copyright © Fortra, LLC and its group of companies. All trademarks and registered trademarks are the property of their respective owners.