HP3000-L Archives

April 1995, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mark Ranft <[log in to unmask]>
Reply To:
Mark Ranft <[log in to unmask]>
Date:
Thu, 13 Apr 1995 17:50:05 GMT
Content-Type:
text/plain
Parts/Attachments:
text/plain (54 lines)
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

ATOM RSS1 RSS2