- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Translation of F$GETDVI(dev,"STS")
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2004 01:13 AM
12-29-2004 01:13 AM
how can I translate the value of F$GETDVI(dev,"STS")?
I want to write a procedure which dismounts all local shadow-members on remote nodes with parameter /POLICY=MINI.
Therefore I started to wrote such a search algorithm:
$!
$ AC = F$GETSYI("ALLOCLASS")
$ X=0
$ LOOP:
$ DSTEMP = F$DEVICE("_$''AC'$*","DISK")
$ if DSTEMP.eqs."" then GOTO exit
$ DSSTS = F$GETDVI(dstemp,"STS")
$ DSMBR = F$GETDVI(dstemp,"SHDW_MEMBER")
$ IF .NOT. DSMBR THEN GOTO LOOP
$!
So now I have several states, that I know that they mean "MOUNTED":
$ STS_TO_NAME:
$ IF DSSTS .EQ. 3088 THEN DSSTS = "MOUNTED"
$ IF DSSTS .EQ. 7184 THEN DSSTS = "MOUNTED"
$ IF DSSTS .EQ. 134219792 THEN DSSTS = "MOUNTED"
$ IF DSSTS .EQ. 134350864 THEN DSSTS = "MOUNTED"
$ IF DSSTS .EQ. 134354960 THEN DSSTS = "MOUNTED"
$ IF DSSTS .EQ. 402786320 THEN DSSTS = "MOUNTED"
$ IF DSSTS .EQ. 402790416 THEN DSSTS = "MOUNTED"
$!
$ if DSSTS .EQS. "MOUNTED"
$ THEN
$ say " ''DSTEMP' ''DSSTS'"
$ X=X+1
$ LINE'X' = "DO DISMOUNT /POLICY=MINICOPY ''DSTEMP'"
$ MAXX=X
$ ENDIF
But I'm sure that's NOT all!
Can anybody help?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2004 01:45 AM
12-29-2004 01:45 AM
Solutionwhy not just check for F$GETDVI(dstmp,"MNT") ?
The definitions of the various bits in UCB$L_STS can be found in SYS$LIBRARY:LIB.REQ
$ sea sys$library:lib.req ucb$v,216/match=and
in BLISS notation fieldname = offset,bit-number,size,sign
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2004 01:54 AM
12-29-2004 01:54 AM
Re: Translation of F$GETDVI(dev,"STS")
$ libr/extr=$ucbdef /out=tmp.tmp sys$library:lib.mlb
Type that file!
$EQU UCB$M_ONLINE <^X10>
$EQU UCB$M_POWER <^X20>
$EQU UCB$M_TIMOUT <^X40>
$EQU UCB$M_INTTYPE <^X80>
$EQU UCB$M_BSY <^X100>
$EQU UCB$M_MOUNTING <^X200>
$EQU UCB$M_DEADMO <^X400>
$EQU UCB$M_VALID <^X800>
Now look at for example 3088
$ x=3088
$ shwo symb x
$ show symb x
X = 3088 Hex = 00000C10 Octal = 00000006020
So this has the bits ONLINE, DEADMO and VALID set.
You should test individual bits with an AND.
Something like:
$UCB$M_VALID = ^X800
$IF (STS .AND. UCB$M_VALID) .NE. 0 THEN...
Whether a device is mounted or not is encoded in the bitmask DEVCHAR which is defined in $DEVDEF
$ pipe libr/extr=$devdef/out=sys$output sys$library:starlet.mlb | searc sys$pipe
MNT
$EQU DEV$M_MNT <^X80000>
$EQU DEV$V_MNT 19
But if you just want to know whether a device is mounted, why not use F$GETDVI(x,"MNT") ?
Hein.
http://h71000.www7.hp.com/doc/732FINAL/4527/4527pro_004.html#index_x_559
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2004 02:36 AM
12-29-2004 02:36 AM
Re: Translation of F$GETDVI(dev,"STS")
Minor correction, and a bit more on bits...
I wrote:
$UCB$M_VALID = ^X800
That should have been %x800
[Guy... if you are reading this... can we get a #include
DCL can easily extract bits from strings, but not from integers. DCL allows for left hand bit address, but not right hand. Combined this give a second way to test for bits:
$ DEV$V_MNT=19
$ bitstring="1234"
$ bitstring[0,32]=f$getdvi("_dka100:","devchar")
$ if f$cvui(DEV$V_MNT,1,bitstring) then write sys$output "Mounted"
Mounted
fwiw....
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2004 04:15 PM
12-29-2004 04:15 PM
Re: Translation of F$GETDVI(dev,"STS")
> [Guy... if you are reading this... can
> we get a #include
>
> us? Mostly kidding! ]
Also mostly kidding. Here's more silly DCL to define symbols from a macro library.
example:
$ @SYMDEF $UCBDEF SYS$SHARE:LIB.MLB
(beware of filling your symbol table!)
SYMDEF.COM (see attachment in case of wrapping)
$ IF p1.EQS."="
$ THEN
$ v=p3-"<"-">"
$ IF F$EXTR(0,2,v).EQS."^X" THEN v="%"+v-"^"
$ 'p2'=='v'
$ ELSE
$ IF p1.EQS."" THEN INQUIRE p1 "Module"
$ IF p2.EQS."" THEN p2="SYS$SHARE:STARLET.MLB"
$ PIPE LIBRARY/EXTRACT='p1'/OUT=SYS$OUTPUT 'p2' | -
SEARCH SYS$PIPE "$EQU" /OUT=SYS$SCRATCH:TMP.COM
$ equ="@''F$ENVIRONMENT("PROCEDURE") ""="""
$ @SYS$SCRATCH:TMP.COM
$ DELETEX SYS$SCRATCH:TMP.COM;
$ ENDIF
$ EXIT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2004 06:22 PM
12-29-2004 06:22 PM