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