ADSM-L

Re: Documenting a Script in TSM

2002-09-06 13:05:18
Subject: Re: Documenting a Script in TSM
From: Bill Boyer <bill.boyer AT VERIZON DOT NET>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Fri, 6 Sep 2002 12:59:35 -0400
Try the ISSUE MESSAGE command in your script. An example from one of ours...

select distinct(client_name) -
as "Active Clients" -
from sessions -
where session_type='Node'
if (RC_NOTFOUND) goto nosessions
/**/
select client_name as node, -
cast(state as char(6)) as state, -
cast(bytes_received as char(8)) as received, -
cast(bytes_sent as char(8)) as sent -
from sessions where session_type='Node' -
order by node
exit
/**/
nosessions:
issue message i -
"*****  Currently no node sessions running  *****"
exit


Bill Boyer
DSS, Inc.

-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU]On Behalf Of
Coats, Jack
Sent: Friday, September 06, 2002 9:06 AM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Documenting a Script in TSM


There is probably a simple answer...

I am running a script from TSM on NT with several commands
that do SQL Queries and TSM commands each morning.

How can I do the equivalent of an 'Echo' or 'Type' command
in the scripts to put a text 'header' of sorts out before each
of the commands?

Example:   I do a 'RUN MORNING' from my web browser TSM
command line.  It executes the following commands:

/* Morning Report */
/*                */
/* First, Copy Pool Tapes to go off site */
query volume * access=readw,reado -
  status=full,filling stgpool=copypool
/* */
/* Second, List TODAYs DataBase backup tape */
query volhist type=dbbackup begindate=today
/* */
/* Third, List the volumes ready to come on-site */
query volume * access=offsite status=empty
/* */
/* Fourth, List all the events in the last    */
/*   work day that should have been completed */
QUERY EVENT * * BEGINDATE=TODAY-1 -
  BEGINTIME=08:00 ENDDATE=TODAY ENDTIME=08:00 -
  EXCEPTIONSONLY=NO FORMAT=STANDARD
/* */
/* Fifth, Query the journal logs and the */
/*   database for their size, 80% is needs */
/*   some attention */
query log
query db
/* Library Volumes */
query libv
/* All Volumes in Catalog */
query vol
/* Space Usage - q occupancy */
query auditoccupancy
/* Storage Group Status */
query stg

And I just want to put what is in the comments out to the
display along with the results of the commands.

Suggestions?

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