Creating product code that automatically registers checks at initialization

In Writing an HZSADDCHECK exit routine, we talked about registering checks for testing purposes. Ultimately, however, you'll probably want your component or product to automatically look for and activate any new checks when it initializes. We're doing this for some of our IBM® products by making check registration part of the initialization processing for the product. Add code similar to the following assembler example to define the HZSADDCHECK exit routine to IBM Health Checker for z/OS and look for and activate new checks:
CSVDYNEX REQUEST=ADD                                          
          EXITNAME=HZSADDCHECK,     /* HEALTH CHECKER name  */
          MODNAME=IBMHCADC,         /* check defintition 
                                          exit routine        */
          MESSAGE=ERROR,                                        
          RetCode=HCRetCode,                                    
          RsnCode=HCRsnCode                                   
                                                                
IF HCRetCode = 0 Then               /* Tell Health Checker to */
HZSCHECK REQUEST=ADDNEW,           /* Look for new checks   */
          RetCode=HCRetCode,                                    
          RsnCode=HCRsnCode