ADSM-L

[ADSM-L] Script that generates a macro? Or something like that....

2008-12-05 13:35:07
Subject: [ADSM-L] Script that generates a macro? Or something like that....
From: "Allen S. Rout" <asr AT UFL DOT EDU>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Fri, 5 Dec 2008 13:33:34 -0500
Greetings.

I'm encountering an infrastructure problem on campus which ends up
with a bunch of sessions periodically entering RecvW status, and
staying there indefinitely.

We're working on fixing the network layer problem, but until that
happens, I'm having to do something like:


dsmadmc -se=ext -id=query -password=query -dataonly=yes -tab "select 'cancel 
sess '||cast(session_id as char(9)) from sessions where state='RecvW' and 
wait_seconds >= 500"

which generates a bunch of output that I can then copy and paste into
an appropriate server window.

I thought to myself, "Gee, I can write a script that

Runs a query to see if there are any candidate sessions

if not, then exit.

If so, then run another query to generate the commands I want to
execute.  Dump this to a macro. (or script)

Run the macro/load and run the script.


Straightforward.  Unfortunately, it doesn't appear that I can write to
a file from one of my scripts, and TSM Quickfacts confirms this.  (Oh,
and the official docs do, too. ;)


So, I'm wondering: How do you-all do such a thing?  I'm reluctant to
regenrate a script every hour from CRON, for example.  sounds iffy.



- Allen S. Rout

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