ADSM-L

[no subject]

2015-10-04 18:11:36
Hi, Crying uncle!

~      C) The server finds NOTHING archived... now start rolling out of the
~         stacks that have been building...
~         SO what do you pass back from the query ?
~            it worked, do you pass back a 0 (zero)
~            do you pass back a pointer to a structure to describe your
~               situation
Ou, ou. I believe we spoke about two different things. Let us retry:


~            it worked, do you pass back a 0 (zero)
 Yes

~            but it found nothing so do you pass back a non-zero
More exactly: I would return quite certain defined and documented value.

~            do you pass back a pointer to a structure to describe your
~               situation
No. DSMC process is usually supposed to be started from a shell, like c-shell, 
cmd.exe or whichewer. The return code will be emited after DSMC process exits. 
In the moment the calling shell will be passed the return code from dsmc, the 
dsmc process is already non-existing, thus there is no address space related to 
it and all pointers pointing on anything in its process are both meaningsless 
and invalid.


The return codes I would like to have would be structured  , maybe like 
following: (only an example)

===========================================
DSMC return codes definition:
===========================================

A) DSMC
        if called without parameters: there will be no meaningfull return codes 
produced.

B) DSMC
        DELETE FILESPACE options

        return code             meaning
        -1                      E: you have not enough rights to execute this 
command
        -2                      W: specified filespace does not exist. Check 
for typo´s using QUERY FILESPACE, and retry.
        -3                      E: syntax error, check "options".
        -4                      E: authentification error. Either unknown node 
name or invalid or missing password .
        -5                      E: communication error. Could not contact the 
server, or the communication broke.
        >0                      I: background process #N started. the return 
code is the process number.


B) DSMC
        ARCHIVE options filespec

        return code             meaning
        0                       I: archive OK, data was archived.
        -2                      W: no data archived. Check for existency of 
"filespec".
        -3                      E: syntax error. Check "options" you specified.
        -4                      E: authentification error. Either unknown node 
name or invalid or missing password .
        -5                      E: communication error. Could not contact the 
server, or the communication broke.
         1                      W: archive OK, but some of files specified in 
"filespec" could not be archived. Check in log file wheteher they have been 
locked, or you had not enoug acces rights to read them.
        

etc. etc. Less or more detailed - but DEFINED.





Juraj SALAK,
KEBA Banking
P.S.
I don´t care our meanings differ - what counts is we speak about

 ----------
~ Von: Dwight Cook
~ An: Multiple recipients of list ADSM-L
~ Betreff: Re: AW: Re: Return Codes
~ Datum: Donnerstag, 12. Dezember 1996 17:46
~
~      OK UNCLE, I'm crying uncle :-(
~
~      What I was trying to stress is that: If "dsmc" were to return a
~      completion code it would be to indicate the health/success of the
~      "dsmc" process/program itself, not a process/action executed while in
~      the dsmc process.   It is pretty safe to say that adsm is written in
~      "C" and as we know there is no such thing as a procedure in "C"...
~      they are all functions... if you want a procedure you pass parameters
~      by reference (not value) and your routines alter the data at the
~      source... and I would say that 99% of the folks coding these
~      "procedures" return a null value from their "procedure" (factually a
~      function)...
~
~      SO THINK OF THIS SITUATION:
~      A) You initiate a dsmc process (actually a function, it will pass back
~          a value... most have said they want it to ba a return code)
~      B) You perform a "query backup /some/data/path/and/file"
~         query is going to be a FUNCTION that returns a value also even
~         though it is a pseudo procedure...
~      C) The server finds NOTHING archived... now start rolling out of the
~         stacks that have been building...
~         SO what do you pass back from the query ?
~            it worked, do you pass back a 0 (zero)
~            but it found nothing so do you pass back a non-zero
~            do you pass back a pointer to a structure to describe your
~               situation
~            REMEMBER: complicating things with all this makes more room
~                      for errors...
~            ALSO REMEMBER what everyone wants is a simple return code
~                 that implies no pointers to structures that describe
~                 what happened... just a value... so when it rolls back
~                 with a non-zero indicating error but actuall just no
~                 data found do you immediately cancel out of your dsmc
~                 and pass that code back to the operating system...?
~      I would be willing to bet if one digs into the API poop they will find
~      that where IBM points out that the return codes from DSMC are
~      meaningless they are that way because (guess-duh-mation here) they are
~      in fact pointing to a structure that describes what happened and if
~      you want to be bold you could probably code  up a "C" routine that you
~      call to involk dsmc and when dsmc exits you could probably map that
~      function return value to some structure found by installing the API
~      poop and make heads or tails out of it that way....
~      I haven't looked into the API stuff so it's all guess-duh-mation on my
~      part... BUT what would you rather do
~        1) grep -i fail /path/dsmerror.log
~           and if $? is 0 know that you had a failure
~        OR
~        2) write a "C" program to call dsmc and then map out the structure
~           it returns and go from there...
~      Heck, who knows it might be as easy as it points to a structure where
~      the first byte is the exitcc and the second byte is the maxcc
~      Or it might be pointing to an offset in the dsmc address space that
~      your request returned the so-believed-to-exist structure and was freed
~      when dsmc terminated so really it points nowhere...
~
~      I'll shut up now...
~      later
~           Dwight
~
~
~
~ ______________________________ Reply Separator 
_________________________________
~ Subject: AW: Re: Return Codes
~ Author:  ADSM-L (ADSM-L AT VM.MARIST DOT EDU) at unix,mime
~ Date:    12/11/96 7:31 AM
~
~
~ Dwight,
~
~ ~      Lots of folks have complained about this but ADSM is following the
~ ~      guidelines of all other programs basically...
~ are you serious about that?
~ I believe most programs on unix, windows and OS/2 Plattform return an 
meaningful
~ l error code.
~
~ Even if the would not: if you really believe the only-log file solution is 
bette
~ r, try to solve following trivial example in both scenarios, and compare the 
len
~ gth of code you have to write:
~
~  - write (a part of) procedure, which performs incremental backup  (e.g. 
"dsmc -
~ incr -passw=xxx")
~ and then a) continuens to work if backup was ok, B) sends a mail to sysop and 
st
~ ops if backup was not OK.
~
~ 1) scenario: DSMC does not return error code
~ 2) scenario: DSMC does  return meaningfull error code
~
~
~ Juraj Salak
~ KEBA Banking
~
~
~
~  ----------
~ ~ Von: Dwight Cook
~ ~ An: Multiple recipients of list ADSM-L
~ ~ Betreff: Re: Return Codes
~ ~ Datum: Dienstag, 10. Dezember 1996 18:02
~ ~
~ ~      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... 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 ? ? ? ? ?
~ ~
~ ~      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'
~ ~
~
------ =_NextPart_000_01BBE8EC.7DABFD50--
=======================================================================
<Prev in Thread] Current Thread [Next in Thread>
  • [no subject], Unknown <=