home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: Backup
/
Backup.zip
/
bacrest.zip
/
DBEXIT.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1997-07-28
|
3KB
|
53 lines
/* Rexx */
/***************************************************************************/
/* Warp Server Backup/Restore Database Backup User Exit */
/* */
/* Copyright 1996 IBM Corp. */
/*-------------------------------------------------------------------------*/
/* Parameters passed: */
/* Complete = 0 at the start of a backup */
/* = 1 at the end of a backup */
/* */
/* BkMethod = Name of the Backup Method used in the backup */
/* */
/* BkpSet = Name of the Backup Set being backed up to */
/* */
/* Incremental = 0 for a full backup */
/* = 1 for an incremental backup */
/* */
/* Manual = 0 for a manual backup */
/* = 1 for an automatic backup */
/***************************************************************************/
Parse arg Complete' <'BkMethod'> <'BkpSet'>' Incremental Manual
/*-------------------------------------------------------------------------*/
/* Check the Complete flag to determine whether this is the beginning or */
/* end of a backup */
/*-------------------------------------------------------------------------*/
If Complete = 0 Then Do
/*----------------------------------------------------------------------*/
/* We're at the beginning of a backup, so now's the time call the */
/* DB/2 database backup function. */
/*----------------------------------------------------------------------*/
/*----------------------------------------------------------------------*/
/* We can check the Backup Method to make sure this is a Database */
/* backup, and if it is, start the database manager and create the */
/* backup file. */
/*----------------------------------------------------------------------*/
If BkMethod = "Base de données" Then Do
'@md c:\dbback'
'@db2 start database manager'
'@db2 backup database sample to c:\dbback'
End
End /* enddo */
Else Do
/*----------------------------------------------------------------------*/
/* The backup has finished, so now we can delete the database backup */
/* file (provided this is a Database backup that is). */
/*----------------------------------------------------------------------*/
If BkMethod = "Base de données" Then Do
Call RxFuncAdd 'SysDestroyObject', 'RexxUtil', 'SysDestroyObject'
SysDestroyObject("c:\dbback")
End
End
return 0