/* Revive! Startup                                           REXX               
   ---------------                                                              
                                                                                
       Present : Kimu.                                                          
       Update  : 1999.09.07                                                     
                                                                                
*/                                                                              
parse upper arg dataset .                                                       
trace 'n'                                                                       
signal on error name err_proc                                                   
                                                                                
/*-------------------------------------------------------------------           
   Settings                                                                     
  -------------------------------------------------------------------*/         
  revtrc   = 'OFF'                  /* Trace mode : ON/OFF           */         
  revclass = '0'                    /* Trace report output class     */         
  revmod   = 'kimu.test.load'       /* Revive! Module library        */         
  revpnl   = 'kimu.test.panels'     /* Revive! Panel library         */         
  revmsg   = 'kimu.test.messages'   /* Revive! Panel library         */         
  ispload  = 'isp.sispload'         /* ISPF load library             */         
/*-------------------------------------------------------------------*/         
                                                                                
address tso                                                                     
/* Module library */                                                            
  select                                                                        
    when ispload = 'NONE' & revmod = 'NONE' then do                             
      nop                                                                       
    end                                                                         
    when ispload = 'NONE' then do                                               
     "alloc f(isplusr) da('"revmod"') shr reu"                                  
      address ispexec "LIBDEF ISPLLIB EXCLLIBR ID(ISPLUSR) COND"                
    end                                                                         
    when revmod  = 'NONE' then do                                               
     "alloc f(isplusr) da('"ispload"') shr reu"                                 
      address ispexec "LIBDEF ISPLLIB EXCLLIBR ID(ISPLUSR) COND"                
    end                                                                         
    otherwise                                                                   
     "alloc f(isplusr) da('"ispload"','"revmod"') shr reu"                      
      address ispexec "LIBDEF ISPLLIB EXCLLIBR ID(ISPLUSR) COND"                
  end                                                                           
                                                                                
/* Panel library */                                                             
  if revpnl = 'NONE' then                                                       
    nop                                                                         
  else do                                                                       
   "alloc f(isppusr) da('"revpnl"') shr reu"                                    
    address ispexec "LIBDEF ISPPLIB LIBRARY  ID(ISPPUSR) COND"                  
  end                                                                           
                                                                                
/* Message library */                                                           
  if revmsg = 'NONE' then                                                       
    nop                                                                         
  else do                                                                       
   "alloc f(ispmusr) da('"revmsg"') shr reu"                                    
    address ispexec "LIBDEF ISPMLIB LIBRARY  ID(ISPMUSR) COND"                  
  end                                                                           
                                                                                
/* Trace List */                                                                
 "alloc f(revtrc)  sysout("revclass") reu"                                      
                                                                                
address ispexec                                                                 
 "VPUT (REVTRC) ASIS"                                                           
                                                                                
 "SELECT PGM(@RV#1) PARM("dataset")"                                            
                                                                                
 "LIBDEF ISPLLIB EXCLLIBR"                                                      
 "LIBDEF ISPPLIB LIBRARY"                                                       
 "LIBDEF ISPMLIB LIBRARY"                                                       
 "VERASE REVTRC BOTH"                                                           
address tso                                                                     
  x = outtrap('a.')                                                             
 "free f(isplusr,isppusr,revtrc)"                                               
  x = outtrap('off')                                                            
 exit                                                                           
                                                                                
err_proc:                                                                       
address ispexec                                                                 
 "LIBDEF ISPLLIB EXCLLIBR"                                                      
 "LIBDEF ISPPLIB LIBRARY"                                                       
 "LIBDEF ISPMLIB LIBRARY"                                                       
 "VERASE REVTRC BOTH"                                                           
address tso                                                                     
  x = outtrap('a.')                                                             
 "free f(isplusr,isppusr,revtrc)"                                               
  x = outtrap('off')                                                            
  say                                                                           
  say                                                                           
  say '>> OS000 Initial process Abnormal Ended ....      Bye !!'                
  say                                                                           
