* Successful and not successful completion
@ 1995-08-09 4:00 caip.rutgers.edu!halasz
1995-08-12 4:00 ` Carl J Lydick
0 siblings, 1 reply; 16+ messages in thread
From: caip.rutgers.edu!halasz @ 1995-08-09 4:00 UTC (permalink / raw)
It seems to me that message 0, successfull completion, and message
4, abort, are flip sides of the same thing, completion. Were it
not better, if message 0 were completion, and success or failure
were shown by $SEVERITY? I so believ.
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: Successful and not successful completion
@ 1995-08-10 4:00 fairfield
1995-08-10 4:00 ` halasz
1995-08-24 4:00 ` System Manager
0 siblings, 2 replies; 16+ messages in thread
From: fairfield @ 1995-08-10 4:00 UTC (permalink / raw)
In article <40bn8l$a1c@caip.rutgers.edu>, <caip.rutgers.edu!halasz> wrote:
> It seems to me that message 0, successfull completion, and message
> 4, abort, are flip sides of the same thing, completion. Were it
> not better, if message 0 were completion, and success or failure
> were shown by $SEVERITY? I so believ.
Believe what you will, but this is VMS, not The Church of
Creation Science. :-)
Before posting another ill-informed opinion, I suggest you study
up on VMS _condition values_. A good reference would be the OpenVMS
Calling Standard, Chapter 6 (in the V6.1 doc set) which discusses
Conditions.
-Ken
--
Kenneth H. Fairfield | Internet: Fairfield@Slac.Stanford.Edu
SLAC, P.O.Box 4349, MS 46 | DECnet: 45537::FAIRFIELD (45537=SLACVX)
Stanford, CA 94309 | Voice: 415-926-2924 FAX: 415-926-3515
-------------------------------------------------------------------------
These opinions are mine, not SLAC's, Stanford's, nor the DOE's...
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Successful and not successful completion
1995-08-10 4:00 Successful and not successful completion fairfield
@ 1995-08-10 4:00 ` halasz
1995-08-10 4:00 ` fairfield
` (5 more replies)
1995-08-24 4:00 ` System Manager
1 sibling, 6 replies; 16+ messages in thread
From: halasz @ 1995-08-10 4:00 UTC (permalink / raw)
In article <1995Aug9.192334.1@sldb5.slac.stanford.edu>, fairfield@sldb5.slac.stanford.edu writes
> ....
> Before posting another ill-informed opinion, I suggest you study
> up on VMS _condition values_. A good reference would be the OpenVMS
> Calling Standard, Chapter 6 (in the V6.1 doc set) which discusses
Why is it a good idea that there is this message,
%SYSTEM-x-NORMAL, normal successful completion
which is not meaningful unless x is "S"?
Why is it a good idea that there is this message,
%SYSTEM-x-ABORT, abort
which is not meaningful unless x is "E" or "F"?
For file not found, even "S" can be useful. No,
it would hav been better if there were one message,
%SYSTEM-x-COMPLETION, completion
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Successful and not successful completion
1995-08-10 4:00 ` halasz
1995-08-10 4:00 ` fairfield
@ 1995-08-10 4:00 ` Jeffrey L. Sue
1995-08-11 4:00 ` Derek Dongray
` (3 subsequent siblings)
5 siblings, 0 replies; 16+ messages in thread
From: Jeffrey L. Sue @ 1995-08-10 4:00 UTC (permalink / raw)
In article <40c5ab$er4@caip.rutgers.edu>, halasz@caip.rutgers.edu writes:
>In article <1995Aug9.192334.1@sldb5.slac.stanford.edu>, fairfield@sldb5.slac.stanford.edu writes
>
>Why is it a good idea that there is this message,
> %SYSTEM-x-NORMAL, normal successful completion
>which is not meaningful unless x is "S"?
>Why is it a good idea that there is this message,
> %SYSTEM-x-ABORT, abort
>which is not meaningful unless x is "E" or "F"?
>For file not found, even "S" can be useful.
I don't know... Why would a utility return %system-f-normal?
Ya see, In VMS there are typically rules to be followed... and they're
actually fairly well documented. And there's at least there's
an attempt to assign meaning to conditions, rather than returning
a mere "success" even when all hell breaks loose.
>No,
>it would hav been better if there were one message,
> %SYSTEM-x-COMPLETION, completion
>
Wow! that's meaningful!!!
So now I guess we don't care if the returned error is:
%DELETE-E-DELVER, explicit version number or wild card required
or
%DELETE-W-SEARCHFAIL, error searching for DKA0:[XXX]X.X;
I mean, why should the computer tell you anything that would
help you figure out what your problem is.
--
(Whatever you do, don't quote me on that.)
JLS
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Successful and not successful completion
1995-08-10 4:00 ` halasz
@ 1995-08-10 4:00 ` fairfield
1995-08-10 4:00 ` Jeffrey L. Sue
` (4 subsequent siblings)
5 siblings, 0 replies; 16+ messages in thread
From: fairfield @ 1995-08-10 4:00 UTC (permalink / raw)
In article <40c5ab$er4@caip.rutgers.edu>, halasz@caip.rutgers.edu writes:
> In article <1995Aug9.192334.1@sldb5.slac.stanford.edu>, I wrote:
>> ....
>> Before posting another ill-informed opinion, I suggest you study
>> up on VMS _condition values_. A good reference would be the OpenVMS
>> Calling Standard, Chapter 6 (in the V6.1 doc set) which discusses
>
> Why is it a good idea that there is this message,
> %SYSTEM-x-NORMAL, normal successful completion
> which is not meaningful unless x is "S"?
> Why is it a good idea that there is this message,
> %SYSTEM-x-ABORT, abort
> which is not meaningful unless x is "E" or "F"?
> For file not found, even "S" can be useful. No,
> it would hav been better if there were one message,
> %SYSTEM-x-COMPLETION, completion
Please, you are posting from a University. If you are not a
student, you at least have research resources available. I don't
feel like explaining all the fields of VMS condition codes in a
usenet message when I _have_ given you an authoritative, and _clear_
reference that _will_ answer your questions. If you can't take the
time to refer to the documentation, perhaps you should find some
other endeavor on which to spend your time.
Oh, and your speculations and suggestions above are naive,
uninformed, and arguably _wrong_, at least in the sense of what
"would hav been better" under VMS.
-Ken
--
Kenneth H. Fairfield | Internet: Fairfield@Slac.Stanford.Edu
SLAC, P.O.Box 4349, MS 46 | DECnet: 45537::FAIRFIELD (45537=SLACVX)
Stanford, CA 94309 | Voice: 415-926-2924 FAX: 415-926-3515
-------------------------------------------------------------------------
These opinions are mine, not SLAC's, Stanford's, nor the DOE's...
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Successful and not successful completion
1995-08-10 4:00 ` halasz
1995-08-10 4:00 ` fairfield
1995-08-10 4:00 ` Jeffrey L. Sue
@ 1995-08-11 4:00 ` Derek Dongray
1995-08-12 4:00 ` Carl J Lydick
1995-08-12 4:00 ` Carl J Lydick
` (2 subsequent siblings)
5 siblings, 1 reply; 16+ messages in thread
From: Derek Dongray @ 1995-08-11 4:00 UTC (permalink / raw)
In article <40c5ab$er4@caip.rutgers.edu>, halasz@caip.rutgers.edu writes:
>Why is it a good idea that there is this message,
> %SYSTEM-x-NORMAL, normal successful completion
>which is not meaningful unless x is "S"?
This is the single case where this is true. Obviously, there has to be
some status that says everything is normal.
>Why is it a good idea that there is this message,
> %SYSTEM-x-ABORT, abort
>which is not meaningful unless x is "E" or "F"?
This is not true. There are many reasons why one might want to return
different levels of "abort":
exit(41) %SYSTEM-S-ABORT, abort The user requested an operation
be aborted rather than exiting
normally, This was handled
successfully.
exit(43) %SYSTEM-I-ABORT, abort Same as above, but since the
abort is not normally used we
flag it for information.
exit(40) %SYSTEM-W-ABORT, abort Everythings's probably OK, but
the user should be warned that
aborting is not recommended
exit(42) %SYSTEM-E-ABORT, abort The program should not have
been aborted. Something is wrong.
exit(44) %SYSTEM-F-ABORT, abort Something is seriously wrong!
>For file not found, even "S" can be useful.
No problem...
exit(98961) %RMS-S-FNF, file not found
Of course, since the routine to find a file is looking for a named file,
the positive return is when it finds it (return status 65537,
%RMS-S-NORMAL, normal successful completion) and not finding a file is
considered failure (returns 98962, %RMS-E-FNF). Any of the status messages
can normally have the severity bits changed to reflect the required
state, although in many (most?) cases this does not make sense! E.g. what
would status 545, "%SYSTEM-S-TAPEPOSLOST, magnetic tape position lost"
mean?
Unfortunately message 1 is the exception. Perhaps it shouldn't be.
> No,
>it would hav been better if there were one message,
> %SYSTEM-x-COMPLETION, completion
I think I finally understand! What you are saying is that the text
of status 1 (SS$_NORMAL) should be just "completion" and it should
not be specially handled, so that one could use...
exit(1) %SYSTEM-S-COMPLETION, completion Successul end.
exit(3) %SYSTEM-I-COMPLETION, completion Ended with information(?)
exit(0) %SYSTEM-W-COMPLETION, completion ...with warnings
exit(2) %SYSTEM-E-COMPLETION, completion ...with errors
exit(4) %SYSTEM-F-COMPLETION, completion ...with severe errors!
While this does make some kind of sense, the whole point of the status
return mechanism is to return *USEFUL* information to the caller/user.
So if the program is not going to return simple success (exit(1)) then
it ought to have some additional information and should use a status with
some appropriate information in it!
--
Derek Dongray, Systems Manager, GenRad Ltd., Cheshire, UK.
dongray@genrad.co.uk dongray@genrad.com 70374,2745
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Successful and not successful completion
1995-08-10 4:00 ` halasz
` (2 preceding siblings ...)
1995-08-11 4:00 ` Derek Dongray
@ 1995-08-12 4:00 ` Carl J Lydick
1995-08-14 4:00 ` Stephen Hoffman
[not found] ` <950811113507.608e@alpha.vitro.com>
5 siblings, 0 replies; 16+ messages in thread
From: Carl J Lydick @ 1995-08-12 4:00 UTC (permalink / raw)
In article <40c5ab$er4@caip.rutgers.edu>, halasz@caip.rutgers.edu writes:
=In article <1995Aug9.192334.1@sldb5.slac.stanford.edu>, fairfield@sldb5.slac.stanford.edu writes
=> ....
=> Before posting another ill-informed opinion, I suggest you study
=> up on VMS _condition values_. A good reference would be the OpenVMS
=> Calling Standard, Chapter 6 (in the V6.1 doc set) which discusses
=
=Why is it a good idea that there is this message,
= %SYSTEM-x-NORMAL, normal successful completion
=which is not meaningful unless x is "S"?
Well, for starters, it makes it easy to parse the severity of the message. For
another, it allows a uniform approach to status values. Furthermore, a value
of I is also meaningful in that context. For example, if you've got a program
that takes a qualifier to enable informational messages as it does its work,
you'd probably want to indicate successful completion of subtasks with
informational messages displayed via SYS$PUTMSG rather than success messages.
=Why is it a good idea that there is this message,
= %SYSTEM-x-ABORT, abort
=which is not meaningful unless x is "E" or "F"?
Now, that's simply not true. There can certainly be applications where an
aborted request is considered, BY THE APPLICATION to be a normal status. For
example, a program to check to see whether a device is working properly could
quite reasonably return "%SYSTEM-S-ABORT, abort" to indicate that it
SUCCESSFULLY tested the device and found a problem with it.
=For file not found, even "S" can be useful. No,
=it would hav been better if there were one message,
= %SYSTEM-x-COMPLETION, completion
Since you were too damned pig-headed to take the good advice given you, I'll
repeat it, moron:
=> Before posting another ill-informed opinion, I suggest you study
=> up on VMS _condition values_. A good reference would be the OpenVMS
=> Calling Standard, Chapter 6 (in the V6.1 doc set) which discusses
An even better reference is the _Message Utility Manual, which discusses
messages in detail. There *IS* one message: it's specified by bits 3-15 of the
message code. Severity is specified by bits 0-2. Facility by bits 16-27, and
internal control flags (including whether DCL should automatically display the
message when your image exits) by bits 28-31. Now, RTFM, and don't bitch again
unless you're willing to learn something instead of mindlessly repeating your
witless diatribe.
--------------------------------------------------------------------------------
Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL
Disclaimer: Hey, I understand VAXen and VMS. That's what I get paid for. My
understanding of astronomy is purely at the amateur level (or below). So
unless what I'm saying is directly related to VAX/VMS, don't hold me or my
organization responsible for it. If it IS related to VAX/VMS, you can try to
hold me responsible for it, but my organization had nothing to do with it.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Successful and not successful completion
1995-08-11 4:00 ` Derek Dongray
@ 1995-08-12 4:00 ` Carl J Lydick
0 siblings, 0 replies; 16+ messages in thread
From: Carl J Lydick @ 1995-08-12 4:00 UTC (permalink / raw)
In article <1995Aug11.105442@genrad.co.uk>, dongray@genrad.co.uk (Derek Dongray) writes:
=This is not true. There are many reasons why one might want to return
=different levels of "abort":
=
= exit(41) %SYSTEM-S-ABORT, abort The user requested an operation
= be aborted rather than exiting
= normally, This was handled
= successfully.
=
= exit(43) %SYSTEM-I-ABORT, abort Same as above, but since the
= abort is not normally used we
= flag it for information.
=
= exit(40) %SYSTEM-W-ABORT, abort Everythings's probably OK, but
= the user should be warned that
= aborting is not recommended
=
= exit(42) %SYSTEM-E-ABORT, abort The program should not have
= been aborted. Something is wrong.
=
= exit(44) %SYSTEM-F-ABORT, abort Something is seriously wrong!
Actually, my take on the severities is a bit different:
0 Warning: Whatever was done apparently did the right thing, but
perhaps not what you expected. For example, if you
attempt to delete a non-existent file, you get the
right result: The file you specified isn't there.
But perhaps that's not quite what you intended;
1 Success: Whatever was done apparently did both the right and
the expected thing;
2 Error: The right thing wasn't done, but you MAY be able to
continue as if it had been, and so attempting isn't
terribly likely to get you into immediate serious
trouble.
3 Informational: The right and expected thing was done, but you asked
(perhaps by default) for the program to tell you what
it was doing. See, for example, DEFINE/LOG vs.
DEFINE/NOLOG when you supersede a previously defined
logical name.
4 Severe error: The right thing wasn't done, and it would almost
certainly be a mistake to continue as if it had been.
=Of course, since the routine to find a file is looking for a named file,
=the positive return is when it finds it (return status 65537,
=%RMS-S-NORMAL, normal successful completion) and not finding a file is
=considered failure (returns 98962, %RMS-E-FNF). Any of the status messages
=can normally have the severity bits changed to reflect the required
=state, although in many (most?) cases this does not make sense! E.g. what
=would status 545, "%SYSTEM-S-TAPEPOSLOST, magnetic tape position lost"
=mean?
It could mean that your tape exercising program successfully found a way to
make the tape fail.
--------------------------------------------------------------------------------
Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL
Disclaimer: Hey, I understand VAXen and VMS. That's what I get paid for. My
understanding of astronomy is purely at the amateur level (or below). So
unless what I'm saying is directly related to VAX/VMS, don't hold me or my
organization responsible for it. If it IS related to VAX/VMS, you can try to
hold me responsible for it, but my organization had nothing to do with it.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Successful and not successful completion
1995-08-09 4:00 caip.rutgers.edu!halasz
@ 1995-08-12 4:00 ` Carl J Lydick
1995-08-12 4:00 ` Dan Pop
0 siblings, 1 reply; 16+ messages in thread
From: Carl J Lydick @ 1995-08-12 4:00 UTC (permalink / raw)
In article <40bn8l$a1c@caip.rutgers.edu>, caip.rutgers.edu!halasz writes:
=It seems to me that message 0, successfull completion, and message
=4, abort, are flip sides of the same thing, completion. Were it
=not better, if message 0 were completion, and success or failure
=were shown by $SEVERITY? I so believ.
Suppose you'd tell us where you find ABORT to be message 4? As a system
service status, SS$_ABORT is 44, not 4. That means that any value from 40 to
47 is "%SYSTEM-x-ABORT, abort", where x is W for 40, S for 41, E for 42, I for
43, F for 44, and ? for 45-47. Similarly, messages 1-7 are
"%SYSTEM-x-NORMAL, normal successful completion", while 0 is
"%NONAME-W-NOMSG, Message number 00000000". Note: The C RTL, in a fit of
accomodation to Unix, converts an exit status of zero to 1.
--------------------------------------------------------------------------------
Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL
Disclaimer: Hey, I understand VAXen and VMS. That's what I get paid for. My
understanding of astronomy is purely at the amateur level (or below). So
unless what I'm saying is directly related to VAX/VMS, don't hold me or my
organization responsible for it. If it IS related to VAX/VMS, you can try to
hold me responsible for it, but my organization had nothing to do with it.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Successful and not successful completion
1995-08-12 4:00 ` Carl J Lydick
@ 1995-08-12 4:00 ` Dan Pop
1995-08-12 4:00 ` Carl J Lydick
0 siblings, 1 reply; 16+ messages in thread
From: Dan Pop @ 1995-08-12 4:00 UTC (permalink / raw)
In <40iqa1$4eg@gap.cco.caltech.edu> carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick) writes:
>43, F for 44, and ? for 45-47. Similarly, messages 1-7 are
>"%SYSTEM-x-NORMAL, normal successful completion", while 0 is
>"%NONAME-W-NOMSG, Message number 00000000". Note: The C RTL, in a fit of
>accomodation to Unix, converts an exit status of zero to 1.
Nope. It does this in a fit of ANSI/ISO C compliance. Before the ANSI
standard (and some time after :-) the VMS C RTL couldn't care less about
the Unix conventions WRT exit status codes.
Dan
--
Dan Pop
CERN, CN Division
Email: Dan.Pop@mail.cern.ch
Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Successful and not successful completion
1995-08-12 4:00 ` Dan Pop
@ 1995-08-12 4:00 ` Carl J Lydick
1995-08-12 4:00 ` Dan Pop
0 siblings, 1 reply; 16+ messages in thread
From: Carl J Lydick @ 1995-08-12 4:00 UTC (permalink / raw)
In article <danpop.808262674@rscernix>, Dan.Pop@mail.cern.ch (Dan Pop) writes:
=In <40iqa1$4eg@gap.cco.caltech.edu> carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick) writes:
=
=>43, F for 44, and ? for 45-47. Similarly, messages 1-7 are
=>"%SYSTEM-x-NORMAL, normal successful completion", while 0 is
=>"%NONAME-W-NOMSG, Message number 00000000". Note: The C RTL, in a fit of
=>accomodation to Unix, converts an exit status of zero to 1.
=
=Nope. It does this in a fit of ANSI/ISO C compliance. Before the ANSI
=standard (and some time after :-) the VMS C RTL couldn't care less about
=the Unix conventions WRT exit status codes.
Hmmm. I thought the ANSI standard required that a successful exit status be
defined by keyword. The exit() function in the VAX C RTL converted zero to one
before the ANSI standard was adopted. return, on the other hand, left the
value untouched.
--------------------------------------------------------------------------------
Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL
Disclaimer: Hey, I understand VAXen and VMS. That's what I get paid for. My
understanding of astronomy is purely at the amateur level (or below). So
unless what I'm saying is directly related to VAX/VMS, don't hold me or my
organization responsible for it. If it IS related to VAX/VMS, you can try to
hold me responsible for it, but my organization had nothing to do with it.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Successful and not successful completion
1995-08-12 4:00 ` Carl J Lydick
@ 1995-08-12 4:00 ` Dan Pop
1995-08-12 4:00 ` David P. Murphy
0 siblings, 1 reply; 16+ messages in thread
From: Dan Pop @ 1995-08-12 4:00 UTC (permalink / raw)
In <40jajf$mt0@gap.cco.caltech.edu> carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick) writes:
>In article <danpop.808262674@rscernix>, Dan.Pop@mail.cern.ch (Dan Pop) writes:
>=In <40iqa1$4eg@gap.cco.caltech.edu> carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick) writes:
>=
>=>43, F for 44, and ? for 45-47. Similarly, messages 1-7 are
>=>"%SYSTEM-x-NORMAL, normal successful completion", while 0 is
>=>"%NONAME-W-NOMSG, Message number 00000000". Note: The C RTL, in a fit of
>=>accomodation to Unix, converts an exit status of zero to 1.
>=
>=Nope. It does this in a fit of ANSI/ISO C compliance. Before the ANSI
>=standard (and some time after :-) the VMS C RTL couldn't care less about
>=the Unix conventions WRT exit status codes.
>
>Hmmm. I thought the ANSI standard required that a successful exit status be
>defined by keyword. The exit() function in the VAX C RTL converted zero to one
>before the ANSI standard was adopted. return, on the other hand, left the
>value untouched.
The ANSI standard guarantees that returning a value from (the initial
invocation of) main() has the same effect as calling exit() with that
value as argument. This is what DEC C does nowadays. ANSI also
guarantees that 0 and EXIT_SUCCESS have the same effect when passed to
exit(), but it doesn't require that EXIT_SUCCESS is defined as 0 (and
DEC C for OpenVMS doesn't define EXIT_SUCCESS as 0).
Dan
--
Dan Pop
CERN, CN Division
Email: Dan.Pop@mail.cern.ch
Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Successful and not successful completion
1995-08-12 4:00 ` Dan Pop
@ 1995-08-12 4:00 ` David P. Murphy
0 siblings, 0 replies; 16+ messages in thread
From: David P. Murphy @ 1995-08-12 4:00 UTC (permalink / raw)
Dan.Pop@mail.cern.ch (Dan Pop) writes:
>(and DEC C for OpenVMS doesn't define EXIT_SUCCESS as 0).
$ search sys$sysdevice:[vms$common.decc$include]stdlib.h exit_
#define EXIT_FAILURE 0x10000002
#define EXIT_SUCCESS 0
?
ok
dpm
--
David P. Murphy, systems programmer
mailto:dpm@access.digex.net COGITO
ftp://ftp.digex.net/pub/access/dpm ERGO
http://www.access.digex.net/~dpm DISCLAIMUM
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Successful and not successful completion
1995-08-10 4:00 ` halasz
` (3 preceding siblings ...)
1995-08-12 4:00 ` Carl J Lydick
@ 1995-08-14 4:00 ` Stephen Hoffman
[not found] ` <950811113507.608e@alpha.vitro.com>
5 siblings, 0 replies; 16+ messages in thread
From: Stephen Hoffman @ 1995-08-14 4:00 UTC (permalink / raw)
In article <40c5ab$er4@caip.rutgers.edu>,
halasz@caip.rutgers.edu writes:
:In article <1995Aug9.192334.1@sldb5.slac.stanford.edu>,
:fairfield@sldb5.slac.stanford.edu writes
:> ....
:> ... I suggest you study
:> up on VMS _condition values_. A good reference would be the OpenVMS
:> Calling Standard, Chapter 6 (in the V6.1 doc set) which discusses
:
:Why is it a good idea that there is this message,
: %SYSTEM-x-NORMAL, normal successful completion
:which is not meaningful unless x is "S"?
:Why is it a good idea that there is this message,
: %SYSTEM-x-ABORT, abort
:which is not meaningful unless x is "E" or "F"?
:For file not found, even "S" can be useful. No,
:it would hav been better if there were one message,
: %SYSTEM-x-COMPLETION, completion
There is a simple test for successful completion, simply test the low bit
of the condition value. (Condition handling is itself a major topic in
the OpenVMS Programming Manual; using the OpenVMS support, one can easily
implement centralized condition handlers and signals under OpenVMS, and
one can also easily implement a condition handling model with more endemic
one-per-operation handlers.)
If using C, the basic test looks like this:
#include <stsdef.h>
RetStat = Mumble();
if ( !$VMS_STATUS_SUCCESS( RetStat ))
return RetStat;
If using VAX macro, the test looks like this:
calls #0,g^Mumble
blbc r0,error
If the low bit is set, the operation succeeded. There was a deliberate
design choice made in OpenVMS to provide this -- the OpenVMS operating
system provides multiple success codes, and multiple failure codes of
various severities, and provides an easy way to perform a blanket "it
worked" or "it failed" test.
I've worked with various applications written for other operating systems,
and I've worked on other operating systems, and I've often found the error
reporting in these situations to be rather inconsistent -- sometimes zero
is success and non-zero is failure, sometimes it's reversed. When zero
is a failure code, one occasionally has to resort to dependence on a
non-reentrant data cell (C routines use errno here) to determine the
reason for the failure. One then needs errno for each thread (or AST)
of execution, where the OpenVMS model is rather easier to deal with.
The OpenVMS scheme certainly appears more baroque when compared with
other schemes and it can certainly be misused by folks testing for one
particular explicit success (or failure) code, but the scheme is what
makes generic recovery routines possible -- one does not need to code
each possible status code, yet one can also easily choose to special-case
a particular set of status codes, status codes from a particular facility,
or status codes of a particular severity level.
------------------------------ Opinionative -------------------------------
Stephen Hoffman OpenVMS Engineering hoffman@xdelta.enet.dec.com
---------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Successful and not successful completion
[not found] ` <950811113507.608e@alpha.vitro.com>
@ 1995-08-17 4:00 ` halasz
0 siblings, 0 replies; 16+ messages in thread
From: halasz @ 1995-08-17 4:00 UTC (permalink / raw)
In article <40c5ab$er4@caip.rutgers.edu>, halasz@caip.rutgers.edu writes
>For file not found, even "S" can be useful.
>From dongray@genrad.co.uk 95Aug11 10:54 +0100:
:No problem...
:
: exit(98961) %RMS-S-FNF, file not found
:
:Of course, since the routine to find a file is looking for a named file,
:the positive return is when it finds it (return status 65537,
:%RMS-S-NORMAL, normal successful completion) and not finding a file is
:considered failure (returns 98962, %RMS-E-FNF).
Yes, if it is DIRECTORY, but it is not hard to imagin that a routine
wants that a file not is there, and when there is not, then a later
routine makes it, with verzion-number 1.
: ....
:Unfortunately message 1 is the exception. Perhaps it shouldn't be.
Right. When VMS was new, status 1 yielded the same basic message as
0 through 7, just as all other messages. Sumfew years ago, DEC so
changed it that onlie severitie 1 yields that message. This clearlie
shows that DEC saw trouble here.
:I think I finally understand! What you are saying is that the text
:of status 1 (SS$_NORMAL) should be just "completion" and it should
:not be specially handled, so that one could use...
:
: exit(1) %SYSTEM-S-COMPLETION, completion Successul end.
:
: exit(3) %SYSTEM-I-COMPLETION, completion Ended with information(?)
:
: exit(0) %SYSTEM-W-COMPLETION, completion ...with warnings
:
: exit(2) %SYSTEM-E-COMPLETION, completion ...with errors
:
: exit(4) %SYSTEM-F-COMPLETION, completion ...with severe errors!
:
Just so.
:While this does make some kind of sense, the whole point of the status
:return mechanism is to return *USEFUL* information to the caller/user.
:So if the program is not going to return simple success (exit(1)) then
:it ought to have some additional information and should use a status with
:some appropriate information in it!
Yes, and for such simple (one-ended/one-goald) programs as DIRECTORY
or DELETE this is so. But for such complex ones as compiler or
ANAL/RMS/INT it is not. When CC otherwize finishes than with an error
wherefrom it forthwith stops (with such an error it quits with an
informativ message), it ends with status with its highest severitie.
If this is 1, it exits with 1, if greater, with 40+severitie. This is
a clear example of bad style, and shows that the message has a problem.
Of cours, it has been pointed out to me (Alpha.vitro.com!VAXS09)
that my suggestion is 15 years too late.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Successful and not successful completion
1995-08-10 4:00 Successful and not successful completion fairfield
1995-08-10 4:00 ` halasz
@ 1995-08-24 4:00 ` System Manager
1 sibling, 0 replies; 16+ messages in thread
From: System Manager @ 1995-08-24 4:00 UTC (permalink / raw)
Stephen Hoffman (hoffman@xdelta.enet.dec.com) wrote:
: The OpenVMS scheme certainly appears more baroque when compared with
: other schemes...
I've always rather liked the OpenVMS scheme, to the point where I've actually
implemented a lot of it in C in order to facilitate porting applications to
Unix systems. I didn't feel bad about this approach, because applications
could migrate in either direction then, and I hadn't ever seen a better
message facility. Apparently you have. Could you point me to them?
Thanks!
Bill Valentine-Cooper
Northwest Consulting Services, Ltd.
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~1995-08-24 4:00 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-08-10 4:00 Successful and not successful completion fairfield
1995-08-10 4:00 ` halasz
1995-08-10 4:00 ` fairfield
1995-08-10 4:00 ` Jeffrey L. Sue
1995-08-11 4:00 ` Derek Dongray
1995-08-12 4:00 ` Carl J Lydick
1995-08-12 4:00 ` Carl J Lydick
1995-08-14 4:00 ` Stephen Hoffman
[not found] ` <950811113507.608e@alpha.vitro.com>
1995-08-17 4:00 ` halasz
1995-08-24 4:00 ` System Manager
-- strict thread matches above, loose matches on Subject: below --
1995-08-09 4:00 caip.rutgers.edu!halasz
1995-08-12 4:00 ` Carl J Lydick
1995-08-12 4:00 ` Dan Pop
1995-08-12 4:00 ` Carl J Lydick
1995-08-12 4:00 ` Dan Pop
1995-08-12 4:00 ` David P. Murphy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox