Here is my unix script: #!/usr/bin/ksh ###################################################################################
ADSM="dsmadmc -id=admin -pass=adsm" #adsm is password for admin $ADSM "q proc" | grep "Space Reclamation" if [[ $? -eq 0 ]] then ## request found $ADSM "q proc" | grep "Space Reclamation" | grep -v grep | \ /usr/bin/awk '{print $1}' | read proc_id fi echo "Process Number = $proc_id" $ADSM "cancel proc $proc_id" $ADSM " backup stg 3584pool incdrpool3" exit Raymond Taw e-mail: [EMAIL PROTECTED] -----Original Message----- From: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED] Behalf Of Loon, E.J. van - SPLXM Sent: Thursday, September 16, 2004 6:42 AM To: [EMAIL PROTECTED] Subject: Re: Script Hi Jonathan! Well, that's not what I was looking for, I want to do this in a TSM script, not in a UNIX script, since I have no access to the UNIX system. Kindest regards, Eric van Loon KLM Royal Dutch Airlines -----Original Message----- From: Jonathan Siegle [mailto:[EMAIL PROTECTED] Sent: Thursday, September 16, 2004 13:41 To: [EMAIL PROTECTED] Subject: Re: Script Loon, E.J. van - SPLXM wrote: > Hi *SM-ers! > I'm trying to create a script which does the following: > 1) query the server for any running reclamation > 2) retrieves the process id for this reclamation > 3) cancels the reclamation > 4) starts a backup storage pool > Can this be done in one script? If so, how do I put the process id in a > variable which I can parse to the cancel command? > Thank you very much for any reply in advance!! > Kindest regards, > Eric van Loon > KLM Royal Dutch Airlines > > > ********************************************************************** > For information, services and offers, please visit our web site: http://www.klm.com. This e-mail and any attachment may contain confidential and privileged material intended for the addressee only. If you are not the addressee, you are notified that no part of the e-mail or any attachment may be disclosed, copied or distributed, and that any other action related to this e-mail or attachment is strictly prohibited, and may be unlawful. If you have received this e-mail by error, please notify the sender immediately by return e-mail, and delete this message. Koninklijke Luchtvaart Maatschappij NV (KLM), its subsidiaries and/or its employees shall not be liable for the incorrect or incomplete transmission of this e-mail or any attachments, nor responsible for any delay in receipt. > ********************************************************************** dsmadmc -id=blah -pass=moreblah q pr | grep "Space Reclaimation" | awk ' { print $1 } ' | xargs -t -I {} dsmadmc -id=blah -pass=moreblah cancel pr {} ; dsmaadmc -id=blah -pass=moreblah backup stgpool importantstuff importantstuffcopy maxpr=10 -Jonathan