ADSM-L

Re: Return Codes

1996-12-11 12:30:54
Subject: Re: Return Codes
From: Francis Dequenne <syf AT ECMWF DOT INT>
Date: Wed, 11 Dec 1996 17:30:54 +0000
Tim,

Thank you very much for your help.

I grant you that the -deletefile switch woud provide a partial solution to the
simple specific example that I was mentionning. One would still not know
whether the operation has been successful or not at the exit of dsmc, though,
unless one starts to analyse logs or to check whether the archived files have
been actually deleted.

I (and apparently, many others) still would like to see dsmc to provide
sensible and documented return codes, hence providing another of the features
of the better behaved unix commands.

On Dec 10,  3:36pm, Pittson, Timothy ,Corp/US wrote:
<=> Subject: Re: Return Codes
<=>Francis,
<=>        Regarding your example of deleting the local copy of a file that was
<=>supposed to be archived, there's a parameter for the ADSM client,
<=>'-deletefiles' that does what you're looking for.
<=>
<=>Tim Pittson
<=>
<=>>----------
<=>>From:  Francis Dequenne[SMTP:syf AT ECMWF DOT INT]
<=>>Sent:  Tuesday, December 10, 1996 1:19 PM
<=>>To:    Multiple recipients of list ADSM-L
<=>>Subject:       Re: Return Codes
<=>>
<=>>Dwight,
<=>>
<=>>I am afraid that I do not agree with your point of view, at least on UNIX
<=>>platforms. Commands should provide meaningful return codes, for the sake of
<=>>poor programmers that have to write scripts :-). It is then the
<=>>user/programmer
<=>>responsibility to ignore these codes or not.
<=>>
<=>>For example, if one wants to use adsm to archive/retrieve files, and these
<=>>operations need to be done as part of a batch script, one has presently a
<=>>hard
<=>>time to trap error conditions. Certainly on our site, these can not be
<=>>ignored
<=>>(e.g. before deleting the local copy of a file that was supposed to be
<=>>archived, we need to make sure that no error were encountered during the
<=>>archive processing.).
<=>>
[snip]
<=>>
<=>>Return codes should not be simply classified as success of failure. A
simple
<=>>method that could be used with dsmc is to provide a 0 rc if everything went
<=>>well, 1 if warning messages  (W) have been encountered, 2 if real error
<=>>messages (E) have been encountered. Much more elaborate schemes could be
<=>>defined, I am sure.
<=>>
<=>>+
<=>>




--
Regards
Regards

+-------------------+----------------------------------+---------------------+
| Francis Dequenne  | Systems Section                  |      /~~\  /~~\     |
| ECMWF             | e-mail: fdequenne AT ecmwf DOT int      |     /    \/    
\    |
| Shinfield Park    | Tel:    (+44 1734) 499361        |   ECMWF             |
| Reading           | Fax:    (+44 1734) 869450        |   ECMWF             |
| Berkshire RG2 9AX | Telex:  (+44 1734) 847908        |     \    /\    /    |
| United Kingdom    |                                  |      \__/  \__/     |
+-------------------+----------------------------------+---------------------+
<Prev in Thread] Current Thread [Next in Thread>