Processing User Exits in a Control Group

A user exit (the *EXIT special value) is a user-defined CL command that permits automatic processing of predefined user routines. Users place an *EXIT special value inside a control group in the sequence order in which they want BRMS to process the request. Use the *EXIT value to send messages or to call applications.

To create a user exit command, take the following steps:

  1. At the Create/Edit Backup Control Group Entries display, treat the *EXIT special value as a backup item and place it in the order in which you want BRMS to process it. Then press Enter. In this example, we use the *EXIT special value to call an application in between the processing of two libraries.
    Note:
    It is recommended that you never run a BRMS or native save command from a *EXIT entry in a backup control group.
                        Create Backup Control Group Entries              RCHAS400  
                                                                                   
     Group . . . . . . . . . . : ETEST2                                            
     Default activity  . . . . . *BKUPCY                                           
     Text  . . . . . . . . . . . *NONE                                             
                                                                                   
     Type information, press Enter.                                                
                                                                                   
                                      Weekly   Retain Save     SWA                 
          Backup     List ASP         Activity Object While    Message    Sync     
     Seq  Items      Type Device      SMTWTFS  Detail Active   Queue      ID       
                                                                                   
       10 *EXIT                       *DFTACT                                      
       20 LIBA            *SYSBAS     *DFTACT  *ERR   *NO                          
       30 *EXIT                       *DFTACT                                      
       40 LIBB            *SYSBAS     *DFTACT  *ERR   *NO                          
       50 *EXIT                       *DFTACT                                      
                                                                                   
                                                                                   
                                                                                   
                                                                             Bottom
     F3=Exit    F5=Refresh    F10=Change item    F11=Display exits                 
     F12=Cancel    F14=Display client omit status    F24=More keys                 
  2. Place your cursor on the *EXIT special value and press F10. This takes you to the User Exit Maintenance display.
                            User Exit Maintenance                        REESES  
                                                                                 
                                                                                 
     Type command, press Enter.                                                  
                                                                                 
       Sequence number . . . . . . . :    30                                     
       Where used  . . . . . . . . . :  *EXIT                                    
       Weekly activity . . . . . . . :  *DFTACT  SMTWTFS                         
       Command . . . . . . . . . . . .  CALL QGPL/STARTAPP                       
                                                                                 
                                                                                 
                                                                                 
                                                                                 
                                                                                 
                                                                                 
                                                                                 
                                                                                 
                                                                                 
                                                                                 
                                                                                 
                                                                                 
                                                                                 
     F3=Exit   F4=Prompt   F12=Cancel                                            
  3. Type the command you want BRMS to process in the Command field. To call the STARTAPP application, type the CALL QGPL/STARTAPP command in the Command field.
  4. Press Enter to return to the Create Backup Control Group Entries display. Then press F3 to exit the display and save the control group. BRMS calls STARTAPP application after the first backup item completes processing and before the second control group begins processing.

If the first entry in a control group is *EXIT, BRMS processes it before performing any preprocessing activities (such as ending subsystems or holding job queues). If the last entry in the control group is *EXIT, BRMS processes this exit after performing any postprocessing activities (such as starting subsystems and releasing job queues).



[ Top of Page | Previous Page | Next Page | Contents | Index ]