Here's one that we use every day, and it works pretty well... from an AIX 4.3.3 machine. This kills any running reclaims:
# Kill any reclaim processes that are running alias dsmadmc="dsmadmc -id=maestro -pa=admin" list_reclaim_pids() { dsmadmc select process_num from processes where process=\'Space Reclamation\' | tail +13 | grep -v ANS } list_tape_stgpools() { dsmadmc select stgpool_name from stgpools where devclass=\'DLT\' | tail +13 | grep -v ANS } dsmadmc q pr for POOL in `list_tape_stgpools` do print "Setting $POOL reclaim threshold to 100%" dsmadmc upd stg $POOL reclaim=100 > /dev/null done for PID in `list_reclaim_pids` do print "Canceling reclamation process $PID" dsmadmc cancel process $PID done Robin Sharpe Berlex Labs "Baines, Paul" <[EMAIL PROTECTED] ZBANK.COM> To: [EMAIL PROTECTED] cc: (bcc: Robin Sharpe/WA/USR/SHG) 11/22/01 06:00 AM Subject: Please respond to "ADSM: AW: transmitting the result of an sql query to a script ? + loop Dist Stor Manager" struture ? I can't think how you'd do it without a shell script. Try this (not tested!) for proc in `dsmadmc -se=xxx -id=xxx -password=xxx -tab "select '#!#!', process_num from processes where process='Space Reclamation'" | awk '/^#! #!/ {printf("%d\n", $2)}'` do dsmadmc -se=xxx -id=xxx -password=xxx -tab "cancel proc $proc" done Mit freundlichen Grüßen - With best regards Serdeczne pozdrowienia - Slan agus beannacht Paul Baines TSM/ADSM Consultant -----Ursprüngliche Nachricht----- Von: PAC Brion Arnaud [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 22. November 2001 11:01 An: [EMAIL PROTECTED] Betreff: transmitting the result of an sql query to a script ? + loop struture ? Hi TSM'ers ! I already saw this in a thread, but can't find it again : I'm looking for a convenient way to stop some reclamation processes in an automated way (script). As those reclamation processes are made on an offsite stg pool, no way stopping them by increasing the reclamation threshold to 100, so I thought to something like : select process_num from processes where process='Space Reclamation' , and then transmit this "process_num" to a cancel proc command. Is there a convenient way doing that, without calling an external AIX script ? More clever : if I have several of those reclamation processes, is there a way building a loop in the script, to cancell them all, while running the script once ? TIA. Arnaud =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | Arnaud Brion, Panalpina Management Ltd., IT Group | | Viaduktstrasse 42, P.O. Box, 4002 Basel - Switzerland | | Phone: +41 61 226 19 78 / Fax: +41 61 226 17 01 | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=