home *** CD-ROM | disk | FTP | other *** search
- /* Rexx =====================================================================*/
- /* Personally Safe'n'Sound Tape Backup Interface */
- /*---------------------------------------------------------------------------*/
- /* Author: Bruce Nash, Warwick Development Group, IBM (UK) Ltd */
- /* Creation Date: 21/Feb/93 */
- /*---------------------------------------------------------------------------*/
- /* (C) Copyright IBM Corp. 1993. All rights reserved. */
- /*===========================================================================*/
- /*---------------------------------------------------------------------------*/
- /* We are passed the name of the batch file */
- /*---------------------------------------------------------------------------*/
- Arg BatchFileName
- /*---------------------------------------------------------------------------*/
- /* Program constants - change these for your own installation */
- /*---------------------------------------------------------------------------*/
- TapeBackupControlFile = "E:\PSS\SYSDATA\BACKUP.BPF"
- /*---------------------------------------------------------------------------*/
- /* Get the name of the batch we're backing up to. */
- /* This is the second word in the first line of the batch. */
- /* (The first word is the drive we're backing up to). */
- /*---------------------------------------------------------------------------*/
- BatchLine = Linein( BatchFileName )
- BatchDrive = word( BatchLine, 1 )
- BatchName = word( BatchLine, 2 )
- BatchLine = Linein( BatchFileName )
- BatchLine = Linein( BatchFileName )
- /*---------------------------------------------------------------------------*/
- /* Scan through the batch file reading each line in turn. */
- /* Each line contains the FileName and the BackupFileName. We must parse */
- /* these and put them in a suitable format for the tape backup processor */
- /*---------------------------------------------------------------------------*/
- Do While( BatchLine ¬= "" )
- FileName = word( BatchLine, 1 )
- BackupFileName = word( BatchLine, 2 )
- /*------------------------------------------------------------------------*/
- /* The format of an OS2TAPE line is: */
- /* /b /b rhs /s "FileName" */
- /*------------------------------------------------------------------------*/
- Call LINEOUT TapeBackupControlFile, '/b /b rhs /s "'||FileName||'"'
- BatchLine = Linein( BatchFileName )
- BatchLine = Linein( BatchFileName )
- End
- /*---------------------------------------------------------------------------*/
- /* Close the control file, and invoke the backup processor */
- /*---------------------------------------------------------------------------*/
- Call LINEOUT TapeBackupControlFile
- Call LINEOUT BatchFileName
- "F:\OS2TAPE\OS2TAPE BACKUP /w 1 /m 1 /n "BatchName" /f "TapeBackupControlFile
- "ERASE "TapeBackupControlFile
- "ERASE "BatchFileName
- exit 0