ADSM-L

Re: RC of scheduled commands

2003-03-31 09:24:25
Subject: Re: RC of scheduled commands
From: Andrew Raibeck <storman AT US.IBM DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Mon, 31 Mar 2003 07:23:57 -0700
Hello Valeriano,

In the case of your third pattern, you understand that the files may not
be there, so it is not a failure (in practice) if the archive does not
work. On the other hand, you say that your first and second patterns
always have files to process. So suppose that TSM did not report failure
if the files could not be found, and also suppose that, due to some
hypothetical error, no files were found in the first or second pattern. I
would think TSM's failure to report an error in this case would not
accurately reflect the status of the operation, from your perspective.

A way around this is to embed the "dsmc archive" command in a script, and
let the script build the pattern, depending on whether the files exist in
your archive patterns. I work mainly in the Windows environment, so
off-hand I can not provide you with a Unix example. But on Windows, I
could probably do something like this:

   @echo off
   setlocal

   REM *** Pattern 1 - See if c:\test1 has any files in it.
   dir c:\test1 /a-d > nul 2>&1
   if %errorlevel% equ 0 (
      set MY_PATTERNS=c:\test1\
   ) else echo No files found in c:\test1

   REM *** Pattern 2 - See if c:\test2 has any files in it.
   dir c:\test2 /a-d > nul 2>&1
   if %errorlevel% equ 0 (
      set MY_PATTERNS=%MY_PATTERNS% c:\test2\
   ) else echo No files found in c:\test2

   REM *** Pattern 3 - See if c:\test3 has any files in it.
   dir c:\test3 /a-d > nul 2>&1
   if %errorlevel% equ 0 (
      set MY_PATTERNS=%MY_PATTERNS% c:\test3\
   ) else echo No files found in c:\test3

   REM *** Now archive all found patterns.
   dsmc archive %MY_PATTERNS%

   echo.
   echo TSM archive ended with return code %errorlevel%

   endlocal

Note that this example does not demonstrate the case if the first two
patterns do not exist, but it is easy enough to do.

Regards,

Andy

Andy Raibeck
IBM Software Group
Tivoli Storage Manager Client Development
Internal Notes e-mail: Andrew Raibeck/Tucson/IBM@IBMUS
Internet e-mail: storman AT us.eyebm DOT com (change eye to i to reply)

The only dumb question is the one that goes unasked.
The command line is your friend.
"Good enough" is the enemy of excellence.




Valeriano Bassi <Valeriano.Bassi AT SSB DOT IT>
Sent by: "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>
03/31/2003 04:00
Please respond to "ADSM: Dist Stor Manager"


        To:     ADSM-L AT VM.MARIST DOT EDU
        cc:
        Subject:        RC of scheduled commands



Hi there,
I would like to know your opinion about a "problem" with the
results of scheduled commands.

We moved our USS TSM client  from  V4 to V5. We have a
scheduled archive commands that has three patterns to
process in the objects field; for the first two, there are always
file to be processed/archived and all works fine (archive
finished without failure is displayed). For the third pattern,
files may or may not be present and if there nothing to process,
ANS1092E msg is diplayed. This lead a subsequent Q EV
to display a status of failed and a result of 12.

I know that, starting from V5, return codes now accurately
reflect the success or failure of client operations but, in my
case, I think this should be handled differently.
I mean, file not found would cause a result of 12 if all the files
were not found, not only some of them.

How can I solve this problem?
Thanks in advance for your cooperation.
Best regards
Valeriano Bassi          valeriano.bassi AT ssb DOT it

<Prev in Thread] Current Thread [Next in Thread>