home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: SysTools / SysTools.zip / backres.zip / RSTEXIT.CMD < prev    next >
OS/2 REXX Batch file  |  1997-07-28  |  3KB  |  52 lines

  1. /* Rexx */
  2. /***************************************************************************/
  3. /* Warp Server Backup/Restore Restore User Exit                            */
  4. /*                                                                         */
  5. /*      Copyright  1995  IBM Corp.                                         */
  6. /*-------------------------------------------------------------------------*/
  7. /* Parameters passed:                                                      */
  8. /*   Complete         = 0 at the start of a restore                        */
  9. /*                    = 1 at the end of a restore                          */
  10. /*                                                                         */
  11. /*   RsMethod         = Name of the Restore Method used in the restore     */
  12. /*                                                                         */
  13. /*   BkpSet           = Name of the Backup Set being restored from         */
  14. /*                                                                         */
  15. /***************************************************************************/
  16. Parse arg Complete' <'RsMethod'> <'BkpSet'>'
  17. /*-------------------------------------------------------------------------*/
  18. /* Check the Complete flag to determine whether this is the beginning or   */
  19. /* end of a restore                                                        */
  20. /*-------------------------------------------------------------------------*/
  21. If Complete = 0 Then Do
  22.    /*----------------------------------------------------------------------*/
  23.    /* We're at the beginning of a restore, so now's the time to shut down  */
  24.    /* any programs which require exclusive access to files.                */
  25.    /*----------------------------------------------------------------------*/
  26.    /*----------------------------------------------------------------------*/
  27.    /* We can check the Restore Method (RsMethod) or Backup Set (BkpSet) to */
  28.    /* determine what applications need to be shut down.                    */
  29.    /*----------------------------------------------------------------------*/
  30.    Select
  31.       When RsMethod = "Database" Then Do
  32.       End
  33.       When RsMethod = "Server" Then Do
  34.       End
  35.       Otherwise
  36.    End /* endselect */
  37. End /* enddo */
  38. Else Do
  39.    /*----------------------------------------------------------------------*/
  40.    /* The restore has finished, so now's the time to start up the programs */
  41.    /* we shut down at the beginning of the restore                         */
  42.    /*----------------------------------------------------------------------*/
  43.    Select
  44.       When RsMethod = "Database" Then Do
  45.       End
  46.       When RsMethod = "Server" Then Do
  47.       End
  48.       Otherwise
  49.    End /* endselect */
  50. End
  51. return 0
  52.