ADSM-L

FW: Return Codes

1996-12-10 15:42:00
Subject: FW: Return Codes
From: Hilton Tina <HiltonT AT IS1.INDY.TCE DOT COM>
Date: Tue, 10 Dec 1996 15:42:00 EST
I agree too.  I also think this should be true of server commands such as
backup stgpool and backup database.  I'm trying to write scripts so I can do
my disaster recover in batch, but it's a pain to issue a backup command and
then issue 'q actlog' commands over and over to see when that backup ends so
the script can issue the next one.  I'd rather the script not continue until
the backup completes and give a return code that indicates whether the
command worked or not.

Tina Hilton
Thomson Consumer Electronics
 ----------
From: David Ong
To: Multiple recipients of list ADSM-L
Subject: Re: Return Codes
Date: Tuesday, December 10, 1996 1:48PM


Francis,
I couldn't agree with you more.

At 06:19 PM 12/10/96 +0000, you wrote:
>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.).
>
>On Dec 10, 11:02am, Dwight Cook wrote:
><=> Subject: Re: Return Codes
><=>     NO IT DOESN'T... BUT like you mentioned if you look in your log
><=>     (unless you are running quiet) you will see everything listed with
a
><=>     status and then at the end there will be an overall condition of
><=>     completion statement...
><=>
><=>     Lots of folks have complained about this but ADSM is following the
>                                                     =====================
><=>     guidelines of all other programs basically...
>        =============================================
>
>Are you sure about this?
>
><=>     compare it to logging
><=>     onto your AIX node... you run many commands/tasks... if you run a
><=>     program that crashes would you want your logon session to report
that
><=>     it failed when you logoff/exit ?  Better would be, if you were
typing
><=>     90 miles an hour, hit your caplock, typed LS <ent> and the system
><=>     would come back with LS not found... one little syntax error...
would
><=>     you now want misc reporting to state that your logon session was a
><=>     failure due to that ? ? ? ? ?
>
>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.
>
><=>
><=>     later
><=>         Dwight
><=>
><=>
><=>
><=>______________________________ Reply Separator
>_________________________________
><=>Subject: Return Codes
><=>Author:  ADSM-L (ADSM-L AT VM.MARIST DOT EDU) at unix,mime
><=>Date:    12/9/96 3:32 PM
><=>
><=>
><=>Hello,
><=>
><=>Does anybody know if the AIX command line interface, dsmc, provides any
><=>kind of return code indication as to the status of a backup or archive
><=>operation? The user guide certainly doesn't contain any info on the
><=>subject. It sure would beat searching thru the redirected output of the
><=>backup/archive job for a text string containing '... ended with 0
failures'
><=> End of excerpt from Dwight Cook
>
>
>
>--
>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    |                                  |      \__/  \__/
  |
>+-------------------+----------------------------------+-------------------


 --+
>
>

Have a nice day or whatever's left of it.

David Ong
National Semiconductor Corp.
<Prev in Thread] Current Thread [Next in Thread>