As yet another example of the numerous ways to do the same task in unix. Here's a simple script I wrote a while back to do the same task:
________ for i in $( dsmadmc -se=xxx -id=xxx -password=xxx "select PROCESS_NUM from processes where PROCESS like 'Space Reclamation'" |grep '[0-9]' |grep -v '[A-z]') do dsmadmc -se=xxx -id=xxx -password=xxx can proc $i done __________ As for the original question: I don't know of a way to do it within the TSM server itself (with either a script or a macro). I'm not saying that it can't be done, only that I don't know of a way. Thanks, Ben -----Original Message----- From: Baines, Paul [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 22, 2001 4:01 AM To: [EMAIL PROTECTED] Subject: AW: transmitting the result of an sql query to a script ? + loop 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 | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=