Hi Eric, Since TSM scripting doesn't support user defined variables I don't think it is possible to do want you want in a server script.
A very ugly way to do it would be to redirect the output of select 'cancel proc ',process_num from processes where process='Space Reclamation' to a file and then call that file as a macro. But then you would still need some kind of filter to strip the header from the output of the sql query. Regards, Alexander ------------------------------------------------------------ Alexander Verkooijen Senior Systems Programmer High Performance Computing SARA Computing & Networking Services > -----Original Message----- > From: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED] > On Behalf Of Loon, E.J. van - SPLXM > Sent: donderdag 16 september 2004 15:42 > 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 >