From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,d12c737003eaeb1 X-Google-Attributes: gidf7344,public X-Google-Thread: 1164f8,d12c737003eaeb1 X-Google-Attributes: gid1164f8,public From: halasz Subject: Re: Successful and not successful completion Date: 1995/08/17 Message-ID: <410egj$64j@caip.rutgers.edu>#1/1 X-Deja-AN: 108351522 distribution: inet sender: halasz@caip.rutgers.edu references: <1995Aug11.105442@genrad.co.uk> <1995Aug9.192334.1@sldb5.slac.stanford.edu> <40c5ab$er4@caip.rutgers.edu> <950811113507.608e@alpha.vitro.com> organization: ? newsgroups: comp.os.vms,comp.sys.dec 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.