|
|
|
|
|
|
| Author |
Message |
Rob Brown *nix forums addict
Joined: 28 Jul 2005
Posts: 67
|
Posted: Fri Feb 11, 2005 11:21 pm Post subject:
Re: DCL call to get shadow member status?
|
|
|
On Fri, 11 Feb 2005 bob@instantwhip.com wrote:
| Quote: | I have two shadow members dka0 and dka100 ... I want to
bring in a third shadow set member for a quick backup nightly
from a batch command routine but I need a vms call to find
out the status of the dka200 thrid member. If it is copying
I will wait 5 minutes then continue to check until the status
shows the disk as a shadow member
|
Check out the F$GETDVI SHDW* calls. Some them ought to do what you
want.
--
Rob Brown b r o w n a t g m c l d o t c o m
G. Michaels Consulting Ltd. (866)438-2101 (voice) toll free!
Edmonton (780)438-9343 (voice)
(780)437-3367 (FAX)
http://gmcl.com/ |
|
| Back to top |
|
 |
Lee Mah *nix forums beginner
Joined: 12 Feb 2005
Posts: 12
|
Posted: Sat Feb 12, 2005 11:56 am Post subject:
Re: DCL call to get shadow member status?
|
|
|
If the prospective shadow member meets any of the following condition,
then it's not eligible for the intended shadow copy.
$ MBRSTAT = F$GETDVI(''DSKMBR', "EXISTS") ! Must be a valid device.
$ IF MBRSTAT .EQS. "FALSE"
$...
$ MBRSTAT = F$GETDVI(''DSKMBR', "SHDW_MASTER") ! Just in case
you put in wrong device DSA.
$ IF MBRSTAT .EQS. "TRUE"
$...
$ MBRSTAT = F$GETDVI(''DSKMBR', "SHDW_MEMBER") ! Can't be an
existing shadow member.
$ IF MBRSTAT .EQS. "TRUE"
$...
$ MBRSTAT = F$GETDVI(''DSKMBR', "MNT") ! This would check if
it's already copying or merging.
$ IF MBRSTAT .EQS. "TRUE" ! A disk may not be
copying/merging, but it could be already mounted.
$...
bob@instantwhip.com wrote:
| Quote: | I have two shadow members dka0 and dka100 ... I want to
bring in a third shadow set member for a quick backup nightly
from a batch command routine but I need a vms call to find
out the status of the dka200 thrid member. If it is copying
I will wait 5 minutes then continue to check until the status
shows the disk as a shadow member ... I could do a
$ show device d/out=somefile
and then parse it, but is there a quicker way?
|
|
|
| Back to top |
|
 |
Rob Brooks *nix forums Guru Wannabe
Joined: 28 Feb 2005
Posts: 106
|
Posted: Sun Feb 13, 2005 3:00 pm Post subject:
Re: DCL call to get shadow member status?
|
|
|
bob@instantwhip.com writes:
| Quote: | I have two shadow members dka0 and dka100 ... I want to
bring in a third shadow set member for a quick backup nightly
from a batch command routine but I need a vms call to find
out the status of the dka200 thrid member. If it is copying
I will wait 5 minutes then continue to check until the status
shows the disk as a shadow member ... I could do a
$ show device d/out=somefile
and then parse it, but is there a quicker way?
|
Use the item code DVI$_SHDW_CATCHUP_COPYING. This item code is documented
and has been around for a long time.
It'll return 1 (or TRUE from DCL) if the member device is either undergoing a
copy, or in need of a copy (in this later case, that means the copy hasn't yet
begun, mostly likely due to all available SHADOW_MAX_COPY threads in use).
--
Rob Brooks VMS Engineering -- I/O Exec Group brooks!cuebid.zko.dec.com |
|
| Back to top |
|
 |
Bart Zorn *nix forums beginner
Joined: 14 Feb 2005
Posts: 32
|
Posted: Mon Feb 14, 2005 8:36 am Post subject:
Re: DCL call to get shadow member status?
|
|
|
Ouch! I cannot let this one pass!
Can you please explain why you use all the single quotes in
$ MBRSTAT = F$GETDVI(''DSKMBR', "EXISTS")
The correct syntax is
$ MBRSTAT = F$GETDVI(DSKMBR, "EXISTS")
And by the way, can you explain WHY your code still DOES work?
Regards,
Bart Zorn
Lee Mah <lytmah@telusplanet.net> wrote in message news:<j2nPd.45170$gA4.40364@edtnps89>...
| Quote: | If the prospective shadow member meets any of the following condition,
then it's not eligible for the intended shadow copy.
$ MBRSTAT = F$GETDVI(''DSKMBR', "EXISTS") ! Must be a valid device.
$ IF MBRSTAT .EQS. "FALSE"
$...
$ MBRSTAT = F$GETDVI(''DSKMBR', "SHDW_MASTER") ! Just in case
you put in wrong device DSA.
$ IF MBRSTAT .EQS. "TRUE"
$...
$ MBRSTAT = F$GETDVI(''DSKMBR', "SHDW_MEMBER") ! Can't be an
existing shadow member.
$ IF MBRSTAT .EQS. "TRUE"
$...
$ MBRSTAT = F$GETDVI(''DSKMBR', "MNT") ! This would check if
it's already copying or merging.
$ IF MBRSTAT .EQS. "TRUE" ! A disk may not be
copying/merging, but it could be already mounted.
$...
bob@instantwhip.com wrote:
I have two shadow members dka0 and dka100 ... I want to
bring in a third shadow set member for a quick backup nightly
from a batch command routine but I need a vms call to find
out the status of the dka200 thrid member. If it is copying
I will wait 5 minutes then continue to check until the status
shows the disk as a shadow member ... I could do a
$ show device d/out=somefile
and then parse it, but is there a quicker way?
|
|
|
| Back to top |
|
 |
Paul Sture *nix forums Guru
Joined: 12 Feb 2005
Posts: 357
|
Posted: Mon Feb 14, 2005 8:52 am Post subject:
Re: DCL call to get shadow member status?
|
|
|
Bart Zorn wrote:
| Quote: | Ouch! I cannot let this one pass!
Can you please explain why you use all the single quotes in
$ MBRSTAT = F$GETDVI(''DSKMBR', "EXISTS")
The correct syntax is
$ MBRSTAT = F$GETDVI(DSKMBR, "EXISTS")
And by the way, can you explain WHY your code still DOES work?
|
IIRC this syntax dates back to V2.n or thereabouts and, as ever, VMS
tries not to break existing code. |
|
| Back to top |
|
 |
Bart Zorn *nix forums beginner
Joined: 14 Feb 2005
Posts: 32
|
Posted: Mon Feb 14, 2005 1:48 pm Post subject:
Re: DCL call to get shadow member status?
|
|
|
Yes, this has worked as lang as DCL has symbol substitution. And just
as long this syntax is nonsense. It merely shows that the programmer
does not understand what symbol substitution is and how it works.
It certainly is NOT old syntax which is still supported!
Regards,
Bart Zorn
Paul Sture <nospam@sture.homeip.net> wrote in message news:<37bamkF5dfrokU1@individual.net>...
| Quote: | Bart Zorn wrote:
Ouch! I cannot let this one pass!
Can you please explain why you use all the single quotes in
$ MBRSTAT = F$GETDVI(''DSKMBR', "EXISTS")
The correct syntax is
$ MBRSTAT = F$GETDVI(DSKMBR, "EXISTS")
And by the way, can you explain WHY your code still DOES work?
IIRC this syntax dates back to V2.n or thereabouts and, as ever, VMS
tries not to break existing code. |
|
|
| Back to top |
|
 |
bob@instantwhip.com *nix forums Guru
Joined: 23 Jul 2005
Posts: 384
|
Posted: Mon Feb 14, 2005 2:05 pm Post subject:
Re: DCL call to get shadow member status?
|
|
|
that did the trick ... now backups are a breeze ... I just bring any
disk
as a third member and then dismount when the copy is done ... |
|
| Back to top |
|
 |
Ken Fairfield *nix forums addict
Joined: 21 Jul 2005
Posts: 94
|
Posted: Mon Feb 14, 2005 10:41 pm Post subject:
Re: DCL call to get shadow member status?
|
|
|
Bart Zorn wrote:
| Quote: | Ouch! I cannot let this one pass!
Can you please explain why you use all the single quotes in
$ MBRSTAT = F$GETDVI(''DSKMBR', "EXISTS")
The correct syntax is
$ MBRSTAT = F$GETDVI(DSKMBR, "EXISTS")
And by the way, can you explain WHY your code still DOES work?
[...] |
It's because the '' gobbles itself up, i.e., is a noop
outside of string context. Note that both,
$ MBRSTAT = F$GETDDVI(DSKMBR', "EXISTS")
and,
$ MBRSTAT = F$GETDDVI(''DSKMBR, "EXISTS")
also "work" even though the syntax is questionable at best,
whereas,
$ MBRSTAT = F$GETDDVI('DSKMBR, "EXISTS")
fails miserably. It's very interesting what people manage
to make "work" in spite of not understanding DCL symbols (and
I've seen much worse!)...
-Ken
--
I don't speak for Intel, Intel doesn't speak for me...
Ken Fairfield
D1C Automation VMS System Support
who: kenneth dot h dot fairfield
where: intel dot com |
|
| Back to top |
|
 |
David J Dachtera *nix forums Guru
Joined: 26 Jun 2005
Posts: 1067
|
Posted: Tue Feb 15, 2005 12:32 am Post subject:
Re: DCL call to get shadow member status?
|
|
|
Ken Fairfield wrote:
| Quote: |
Bart Zorn wrote:
Ouch! I cannot let this one pass!
Can you please explain why you use all the single quotes in
$ MBRSTAT = F$GETDVI(''DSKMBR', "EXISTS")
The correct syntax is
$ MBRSTAT = F$GETDVI(DSKMBR, "EXISTS")
And by the way, can you explain WHY your code still DOES work?
[...]
It's because the '' gobbles itself up, i.e., is a noop
outside of string context. Note that both,
$ MBRSTAT = F$GETDDVI(DSKMBR', "EXISTS")
and,
$ MBRSTAT = F$GETDDVI(''DSKMBR, "EXISTS")
also "work" even though the syntax is questionable at best,
whereas,
$ MBRSTAT = F$GETDDVI('DSKMBR, "EXISTS")
fails miserably. It's very interesting what people manage
to make "work" in spite of not understanding DCL symbols (and
I've seen much worse!)...
|
Silver star to Ken for his explanation of this harmless syntax faux pas.
--
David J Dachtera
dba DJE Systems
http://www.djesys.com/
Unofficial OpenVMS Hobbyist Support Page:
http://www.djesys.com/vms/support/
Unofficial Affordable OpenVMS Home Page:
http://www.djesys.com/vms/soho/
Unofficial OpenVMS-IA32 Home Page:
http://www.djesys.com/vms/ia32/
Coming soon:
Unofficial OpenVMS Marketing Home Page |
|
| Back to top |
|
 |
John Santos *nix forums Guru Wannabe
Joined: 25 May 2005
Posts: 189
|
Posted: Tue Feb 15, 2005 2:38 am Post subject:
Re: DCL call to get shadow member status?
|
|
|
Ken Fairfield wrote:
| Quote: | Bart Zorn wrote:
Ouch! I cannot let this one pass!
Can you please explain why you use all the single quotes in
$ MBRSTAT = F$GETDVI(''DSKMBR', "EXISTS")
The correct syntax is
$ MBRSTAT = F$GETDVI(DSKMBR, "EXISTS")
And by the way, can you explain WHY your code still DOES work?
[...]
It's because the '' gobbles itself up, i.e., is a noop
outside of string context. Note that both,
$ MBRSTAT = F$GETDDVI(DSKMBR', "EXISTS")
and,
$ MBRSTAT = F$GETDDVI(''DSKMBR, "EXISTS")
also "work" even though the syntax is questionable at best,
whereas,
$ MBRSTAT = F$GETDDVI('DSKMBR, "EXISTS")
fails miserably. It's very interesting what people manage
to make "work" in spite of not understanding DCL symbols (and
I've seen much worse!)...
-Ken
|
In a log (batch log or @com/output= log), or if DCL verify is enabled,
$ MBRSTAT = F$GETDDVI("''DSKMBR'", "EXISTS")
displays the value of DSKMBR in the log, which is sometimes useful.
On the other hand
$ MBRSTAT = F$GETDDVI(DSKMBR, "EXISTS")
makes it clear that the command file is using a symbol for the device
name, and what that symbol is, which might make debugging the command
file easier.
In either case, F$GETDDVI is a typo - the correct lexical is F$GETDVI.
--
John Santos
Evans Griffiths & Hart, Inc.
781-861-0670 ext 539 |
|
| Back to top |
|
 |
Ken Fairfield *nix forums addict
Joined: 21 Jul 2005
Posts: 94
|
Posted: Tue Feb 15, 2005 9:15 pm Post subject:
Re: DCL call to get shadow member status?
|
|
|
John Santos wrote:
[big snip]
| Quote: |
In a log (batch log or @com/output= log), or if DCL verify is enabled,
$ MBRSTAT = F$GETDDVI("''DSKMBR'", "EXISTS")
displays the value of DSKMBR in the log, which is sometimes useful.
|
Indeed it does and I have no argument with that. OTOH, the
question was the use of ''DSKMBR' outside of string context.
What you show above is within a string. Correct, but not relevant
to Bart's query.
| Quote: | On the other hand
$ MBRSTAT = F$GETDDVI(DSKMBR, "EXISTS")
makes it clear that the command file is using a symbol for the device
name, and what that symbol is, which might make debugging the command
file easier.
In either case, F$GETDDVI is a typo - the correct lexical is F$GETDVI.
|
Yep, I surely fat-fingered that one. ;-p But here's yet another
example of (current) DCL "parsing only as far as the 4th character
of a verb", if you allow me to extend the analogy to lexical
functions. F$GETDXYZZY works equally as well as F$GETDVI, much as
LOGOMETRICAL works just as well as LOGOFF, which works just as well
as the actual verb, LOGOUT. :-)
-Ken
--
I don't speak for Intel, Intel doesn't speak for me...
Ken Fairfield
D1C Automation VMS System Support
who: kenneth dot h dot fairfield
where: intel dot com |
|
| Back to top |
|
 |
Paul Sture *nix forums Guru
Joined: 12 Feb 2005
Posts: 357
|
Posted: Tue Feb 15, 2005 10:02 pm Post subject:
Re: DCL call to get shadow member status?
|
|
|
Ken Fairfield wrote:
| Quote: | John Santos wrote:
[big snip]
In a log (batch log or @com/output= log), or if DCL verify is enabled,
$ MBRSTAT = F$GETDDVI("''DSKMBR'", "EXISTS")
displays the value of DSKMBR in the log, which is sometimes useful.
Indeed it does and I have no argument with that. OTOH, the
question was the use of ''DSKMBR' outside of string context.
What you show above is within a string. Correct, but not relevant
to Bart's query.
On the other hand
$ MBRSTAT = F$GETDDVI(DSKMBR, "EXISTS")
makes it clear that the command file is using a symbol for the device
name, and what that symbol is, which might make debugging the command
file easier.
In either case, F$GETDDVI is a typo - the correct lexical is F$GETDVI.
Yep, I surely fat-fingered that one. ;-p But here's yet another
example of (current) DCL "parsing only as far as the 4th character
of a verb", if you allow me to extend the analogy to lexical
functions. F$GETDXYZZY works equally as well as F$GETDVI, much as
LOGOMETRICAL works just as well as LOGOFF, which works just as well
as the actual verb, LOGOUT. :-)
|
With the following twist:
In SYLOGIN.COM:
$ LOG*OUT == @SYS£MANAGER:LOGOUT
Then LOG, LOGO, LOGOU, LOGOUT will execute the command file.
LOGOFF can be used to bypass the execution of the command file (useful
if it's log-winded). |
|
| Back to top |
|
 |
Ken Fairfield *nix forums addict
Joined: 21 Jul 2005
Posts: 94
|
Posted: Tue Feb 15, 2005 11:49 pm Post subject:
Re: DCL call to get shadow member status?
|
|
|
Paul Sture wrote:
| Quote: | Ken Fairfield wrote:
[...]
Yep, I surely fat-fingered that one. ;-p But here's yet another
example of (current) DCL "parsing only as far as the 4th character
of a verb", if you allow me to extend the analogy to lexical
functions. F$GETDXYZZY works equally as well as F$GETDVI, much as
LOGOMETRICAL works just as well as LOGOFF, which works just as well
as the actual verb, LOGOUT. :-)
With the following twist:
In SYLOGIN.COM:
$ LOG*OUT == @SYS£MANAGER:LOGOUT
Then LOG, LOGO, LOGOU, LOGOUT will execute the command file.
LOGOFF can be used to bypass the execution of the command file (useful
if it's log-winded).
|
But I was referring to VERBs. Here you've brought in DCL symbol
processing. You're correct, of course, but I wouldn't call it a
"twist". I'd prefer to call it the, "VMS expert's secret weapon to
defeat clueless users' symbols". :-)
-Ken
--
I don't speak for Intel, Intel doesn't speak for me...
Ken Fairfield
D1C Automation VMS System Support
who: kenneth dot h dot fairfield
where: intel dot com |
|
| Back to top |
|
 |
John Santos *nix forums Guru Wannabe
Joined: 25 May 2005
Posts: 189
|
Posted: Thu Feb 17, 2005 2:46 am Post subject:
Re: DCL call to get shadow member status?
|
|
|
Ken Fairfield wrote:
| Quote: | John Santos wrote:
[big snip]
In a log (batch log or @com/output= log), or if DCL verify is enabled,
$ MBRSTAT = F$GETDDVI("''DSKMBR'", "EXISTS")
displays the value of DSKMBR in the log, which is sometimes useful.
Indeed it does and I have no argument with that. OTOH, the
question was the use of ''DSKMBR' outside of string context.
What you show above is within a string. Correct, but not relevant
to Bart's query.
|
The original (long snipped) seemed to be a mish-mash of the two examples
I posted here, so that's why I posted this. It wasn't what the OP
asked, but it might have been what he wanted. My point was either you
should include the whole thing in double-quotes (so that DCL does symbol
substitution inside a quoted string), or get rid of the single quotes
entirely.
Someone else posted an analysis of what happens when the
single-quote-only version gets parsed and why it works. (Basically,
because all the quotes get thrown away.)
| Quote: | On the other hand
$ MBRSTAT = F$GETDDVI(DSKMBR, "EXISTS")
makes it clear that the command file is using a symbol for the device
name, and what that symbol is, which might make debugging the command
file easier.
In either case, F$GETDDVI is a typo - the correct lexical is F$GETDVI.
Yep, I surely fat-fingered that one. ;-p But here's yet another
example of (current) DCL "parsing only as far as the 4th character
of a verb", if you allow me to extend the analogy to lexical
functions. F$GETDXYZZY works equally as well as F$GETDVI, much as
LOGOMETRICAL works just as well as LOGOFF, which works just as well
as the actual verb, LOGOUT. :-)
-Ken
|
Yup (BTW, IIRC, the orignal post had a single "D") but once you
start down the road to pedantry, it is hard to stop :-)
--
John Santos
Evans Griffiths & Hart, Inc.
781-861-0670 ext 539 |
|
| Back to top |
|
 |
John Santos *nix forums Guru Wannabe
Joined: 25 May 2005
Posts: 189
|
Posted: Thu Feb 17, 2005 4:39 am Post subject:
Re: DCL call to get shadow member status?
|
|
|
Sorry to follow up my own post, but...
John Santos wrote:
| Quote: | Ken Fairfield wrote:
John Santos wrote:
[big snip]
[bigger snip]
asked, but it might have been what he wanted. My point was either you
|
Ken, this is the generic "you", not the personal "you"! I'm not sniping
at you (the personal "you"), honestly. I think it would have been
better to say "Best practice would be to include the whole thing in ..."
in classic stilted, impersonal, computer documentation style.
| Quote: | should include the whole thing in double-quotes (so that DCL does symbol
substitution inside a quoted string), or get rid of the single quotes
entirely.
|
The cure for quote-quote-quote-quote-quote-quote syndrome is sometimes
getting rid of some of the quotes. :)
[snip]
| Quote: | Yup (BTW, IIRC, the orignal post had a single "D") but once you
|
Yet, another usage of "you", which this time means "me"!
| Quote: | start down the road to pedantry, it is hard to stop
|
--
John Santos
Evans Griffiths & Hart, Inc.
781-861-0670 ext 539 |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Thu Jan 08, 2009 4:03 am | All times are GMT
|
|
Libros medicina | Loans | Bank Credit Cards | Bankruptcy | Adverse Credit Remortgage
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|