Operating System - OpenVMS
1753725 Members
4514 Online
108799 Solutions
New Discussion юеВ

Re: Getting "Device Offline" status from DCL

 
SOLVED
Go to solution
Jack Trachtman
Super Advisor

Getting "Device Offline" status from DCL

(VMS V7.3-2)

I'm trying to determine if a disk is Offline from within a DCL script. Looks like F$GETDVI returns this with either the DEVDEPEND or DEVDEPEND2 keyword, but not being familiar with system service calls I can't figure out which of the above keywords to use, and which bit within that keyword gives me what I want (seems to be related to the SS$_DEVOFFLINE status word). Can someone help? TIA
6 REPLIES 6
Karl Rohwedder
Honored Contributor

Re: Getting "Device Offline" status from DCL

I normally use keywords "EXISTS" and "AVL" to check for a device.

regards Kalle
Jack Trachtman
Super Advisor

Re: Getting "Device Offline" status from DCL

Karl,

I get a TRUE return for both EXISTS & AVL on an Offline disk.
Jim_McKinney
Honored Contributor
Solution

Re: Getting "Device Offline" status from DCL

You want to be looking for UCB$M_ONLINE in the UCB$L_STATUS field.

From DCL (replacing 'disk' with whatever you find appropriate


$ pipe libr/extr=$ucbdef/out=sys$output sys$share:lib.mlb | -
sear sys$pipe ucb$m_online
$ ucb$m_online = %x10
$ disk = "DKA0"
$ if (f$getdvi(disk,"sts") .and. UCB$M_ONLINE) .ne. UCB$M_ONLINE -
then write sys$output "''disk' is offline"
Robert_Boyd
Respected Contributor

Re: Getting "Device Offline" status from DCL

"EXISTS" corresponds to the device actually being in the list of currently configured devices on the system.

"AVL" corresponds to whether or not the device has been declared AVAILABLE/NOAVAILABLE( SET DEVICE/[NO]AVAILABLE).

Have you tried path_available or path_not_responding to see what you get from those? You may well have to extract it from the DEVDEPEND* fields. I found this:

UCB$L_DK_DEVOFFLINE = 804,0,32,1 %; ! SS$_DEVOFFLINE ...

The contents of the DEVDEPEND* are defined under each of the drivers in the IO User's Reference Manual. I suspect you will want to consult that manual.

Robert
Master you were right about 1 thing -- the negotiations were SHORT!
Robert_Boyd
Respected Contributor

Re: Getting "Device Offline" status from DCL

Good one Jim -- can also find this with

$ search sys$share:*.req ucb$m_online
Master you were right about 1 thing -- the negotiations were SHORT!
Joseph Huber_1
Honored Contributor

Re: Getting "Device Offline" status from DCL

Wouldn't issuing a IO$_PACKACK to the device (after checking availability) be a better check? It also checks media loaded.

A simple packack program e.g. in
< http://wwwvms.mppmu.mpg.de/~huber/util/main/packack.for >
http://www.mpp.mpg.de/~huber