Tivoli Header

Administrator's Guide


Sample User Exit Program (ANRUSRXC.C)

Figure 103. ANRUSRXC.C

/*********************************************************************  
 *  Name:         ANRUSRXC.C                                            
 *                                                                      
 *  Description:  Example user-exit program that is invoked by          
 *                the ADSM V3 Server                                    
 *                                                                      
 *  Environment:  *********************************************         
 *                ** This is a platform-specific source file **         
 *                ** versioned for:   "MVS"                  **         
 *                *********************************************         
 *                                                                      
 *  Notes:  The C user-exit routine MUST BE compiled with the           
 *          NOSTART option                                              
 *                                                                      
 ********************************************************************/  
                                                                        
#pragma csect(code,"ANRUSRX$")                                          
#pragma csect(static,"ANRUSRX@")                                        
                                                                        
#include <stdio.h>                                                      
                                                                    
/**************************************/                           
/*** Do not modify below this line. ***/                           
/**************************************/                           
                                                                    
#include "ANRUSRXH.H"                                              
                                                                    
/*--------------------------------------------------------------*/ 
/*                                                              */ 
/*  Procedure:  anrusrxc                                        */ 
/*                                                              */ 
/*     When this routine gets control, a valid and appropriate  */ 
/*     event will cause an elEventRecvData structure to be      */ 
/*     passed to this routine.                                  */ 
/*                                                              */ 
/*     The elEventRecvData structure can be found in            */ 
/*     ANRUSRXH which is distributed and can be found in the    */ 
/*     SAMPLIB dataset.                                         */ 
/*                                                              */ 
/*  INPUT:    elEventRecvData structure.                        */ 
/*  RETURNS:  return code                                       */ 
/*--------------------------------------------------------------*/ 
                                                                   
int anrusrxc( char *arg )                                          
  {                                                                
   elEventRecvData *eventData = (elEventRecvData *)arg ;           
                                                                   
   /**************************************/                        
   /*** Do not modify above this line. ***/                        
   /**************************************/                        
                                                                   
   if( ( eventData->eventNum == USEREXIT_END_EVENTNUM ) ||         
       ( eventData->eventNum == END_ALL_RECEIVER_EVENTNUM ) )                                                                                                                                  
     {                                                             
      /*----------------------------------------------------*/     
      /*  The server has indicated that this USEREXIT is    */     
      /*  ending.  Perform any cleanup but do not exit() !! */     
      /*----------------------------------------------------*/     
      return 0;                                                    
     } 
                                                               
   /*-------------------------------------------------------*/ 
   /*  Your code to handle the event data goes here ...     */ 
   /*-------------------------------------------------------*/ 
                                                               
   return 0;                                                   
                                                               
  }    /*--End of anrusrxc()--*/                                                                                                                                                                   


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