1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
|
/* REXX ****************************************************/
/* BLABELI EXEC -- Example VM procedure for labeling tapes */
/* to be used with Bacula in IBM SL label */
/* mode. */
/* */
/* Author: David Boyes <dboyes@sinenomine.net> */
/* */
/* Prereq: Tape drive attached at virtual addr */
/* 181 (TAP1). */
/* */
/* Blank tape inserted in drive. */
/* */
/* External file BACULA DATA (used as a */
/* dummy input file for MOVEFILE, since */
/* MOVEFILE insists on having a real file */
/* for input if we want actual output */
/* by the CMS OS sim routines). */
/* */
/* Usage: BLABELI volumeid ownerid */
/* */
/* where: */
/* */
/* volumeid = IBM SL volume id to be */
/* written in VOL1 label and made */
/* visible to the library automation */
/* and other OSes. */
/* */
/* ownerid = local userid to "own" the */
/* tape from the TMS viewpoint. Used */
/* to validate mount requests and for */
/* TMS housekeeping purposes. */
/* */
/* Maintenance Log: */
/* */
/* 16 Feb 2005 -- DB: Created procedure and released to */
/* Bacula development list. */
/* */
/* */
/* */
/* */
/* */
/* */
/***********************************************************/
/***********************************************************/
/* Parse command line arguments */
/***********************************************************/
arg volser owner
/***********************************************************/
/* Rewind tape and write IBM VOL1 label and logical EOT */
/***********************************************************/
'TAPE REW (TAP1'
'TAPE WVOL1' volser owner '( TAP1 SL'
'TAPE WTM 2'
/***********************************************************/
/* Rewind tape and write Bacula IBM label signature file */
/* (HDR1 file containing BACULA.DATA FID as 1st file on */
/* tape). Note that for some reason the LABELDEF command */
/* requires FIDs longer than 8 chars to be passed via the */
/* program stack, even if it would not cause the resulting */
/* command to exceed the 255 char maximum. This is (IMHO) */
/* an APARable bug, but c'est la vie. */
/***********************************************************/
'TAPE REW ( TAP1'
'SET CMSTYPE HT' /* supress output to hide prompt for FID */
'FILEDEF INMOVE DISK BACULA DATA A'
'FILEDEF OUTMOVE TAP1 SL ( RECFM F LRECL 80'
queue "BACULA.DATA"
'LABELDEF OUTMOVE FID ? VOLID' volser 'VOLSEQ 1 FSEQ 1'
'MOVEFILE'
'SET CMSTYPE RT' /* resume normal console output */
/***********************************************************/
/* Print nice exit message and exit */
/***********************************************************/
say "Labeled IBM SL" volser "for use with Bacula."
exit
|