Subject: | |
From: | |
Reply To: | |
Date: | Thu, 13 Apr 1995 17:50:05 GMT |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
In article <cm.797523270@merle>, [log in to unmask] says...
>
>I have two remote sites where we've set up backups to run as
jobs
<snip>>
>
>Is there any way to test for the presence of a tape (scsi dat)
mounted from a
>job stream?
<Snip>
--
>christopher michael, george s. may international, 708-825-8806 x
395
>
Try this Command file:
PARM LDEV="7"
comment ******************************************************
comment * Command File: CHECKDEV.COMMANDS.SYS *
comment * Version Date: 09/02/93 *
comment * This Command File will check the availability of *
comment * the device number entered and set a variable to *
comment * indicate 'AVAIL ' or 'UNAVAIL' and set a variable*
comment * for the Owner of the device. *
comment ******************************************************
FILE temp1;REC=-80,3,F,ASCII;DEV=DISC;DISC=10;MSG
SHOWDEV !LDEV >>*temp1
RESET temp1
INPUT TAPECHK <temp1
SETVAR AVLPOS POS("AVAIL","!TAPECHK",1)
SETVAR OWNPOS POS("OWNER","!TAPECHK",1)
INPUT TAPECHK <temp1
SETVAR LDEV!LDEV STR("!TAPECHK",!AVLPOS,7)
SETVAR LDEV_OWNER STR("!TAPECHK",!OWNPOS,3)
DELETEVAR TAPECHK
DELETEVAR AVLPOS
DELETEVAR OWNPOS
PURGE temp1,TEMP
The following illustrates the usage of the command file:
Please note the spaces following AVAIL!!!):
:xeq checkdev 7
:showvar L@
LDEV7 = AVAIL
LDEV_OWNER =
:echo "!LDEV7"
"AVAIL "
:if (LDEV7 = "AVAIL ") THEN
*** EXPRESSION TRUE
:endif
|
|
|