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: dongray@genrad.co.uk (Derek Dongray) Subject: Re: Successful and not successful completion Date: 1995/08/11 Message-ID: <1995Aug11.105442@genrad.co.uk>#1/1 X-Deja-AN: 107977742 distribution: world sender: dongray@GenRad.co.uk (Derek Dongray) references: <1995Aug9.192334.1@sldb5.slac.stanford.edu> <40c5ab$er4@caip.rutgers.edu> organization: GenRad Ltd reply-to: dongray@genrad.co.uk newsgroups: comp.os.vms,comp.sys.dec 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