In UNIX (AIX Korn shell used as an example...):

Here's one way to get it done.  You can use a shell script
to evaluate the current date, then write out a file that
contains the "generate" command with the date string embedded
in it.  This would probably have to get run from cron,
and an example might look like this:

echo "generate blah setname$(date +%Y+%b+%d) blah" > /tmp/outfile
or
echo "generate blah setname`date +%Y%b%d` blah" > /tmp/outfile
((( NOTE the grave quotes!!!!  Use the unshifted tilde key,
upper left next to the numeral 1 on the keyboard )))

RTFM man date for your platform specifics on what the %<ASCII>
formatters do.  In the case of AIX, you get a date format like
2000Sep04.  Choose formatters such that you get the date
representation that fits your listing/ cataloging and/or
storage requirements.

Now define two admin schedules in TSM, one to destroy the script
and another to define it again using the file you just wrote out.
For example, to manage backupsets on a node-by-node basis, you might
define admin scedules that execute the following commands daily:
delete script <node>backset
define script <node>backset file=/tmp/outfile

Viola.  A dynamic date in a static server script. As long as you
don't need more than one a day, you're golden.

We're using TSM 3.7, and I believe 4.1 works about the same way.

Another approach might be to execute the "generate" command in
dsmadmc batch mode, using direct shell substitution to accomplish
the same thing, scheduled from cron...but this gets pretty ugly from
a TSM scheduling coordination point of view.

Seems to me there ought to also be a way to issue a select on the DB to
get the current date and time (harkening back to my Oracle days) so
maybe somebody with a better grasp on the DB content can fill in
that blank.

HTH and good luck!

Dan



"Kelly J. Lipp" wrote:
>
> Gang,
>
> Here what I would like to do:
>
> generate backupset node setname'date' devclass=name scratch=yes...
>
> Where I replace 'date' with a symbol that will substitute today's date.
> Anybody have an idea how to do this from within a script or within a macro,
> or within a DOS .bat file?
>
> TIA,
>
> Kelly J. Lipp
> Storage Solutions Specialists, Inc.
> PO Box 51313
> Colorado Springs CO 80949-1313
> www.storsol.com
> [EMAIL PROTECTED]
> 719-531-5926
> Fax: 719-260-5991

Reply via email to