Jack,
I think your problem is with these lines:
for /F "eol=A tokens=1* skip=8 " %%i in (TEMP3.TXT) do (
%DSMC% KILL PROC %%i
)
They should read:
for /F "eol=A tokens=1* skip=8 " %%i in (TEMP3.TXT) do (
%DSMC% /*_CANCEL_ */PROC %%i
)
There is no TSM server command of KILL PROC, but there is a CANCEL PROC!
Try that.
-- Regards, Mark D. Rodriguez President MDR Consulting, Inc.
=============================================================================== MDR Consulting The very best in Technical Training and Consulting. IBM Advanced Business Partner SAIR Linux and GNU Authorized Center for Education IBM Certified Advanced Technical Expert, CATE AIX Support and Performance Tuning, RS6000 SP, TSM/ADSM and Linux Red Hat Certified Engineer, RHCE ===============================================================================
Coats, Jack wrote:
Does someone have a script (Unix is ok, Windows is preferred) that can cancel currently running migrations?
My script doesn't seem to work just right. Any suggestions (or a script that works for you :-) ) would really help!
Here is my attempt:
@Echo Off
REM c:\SBIB\TSMKillReclaimation.cmd - 20040916 jcoats - based a thread in the ADSM-L list
REM requires command line e-mail client BLAT to send reprots
set PATH=%PATH%;c:\Progra~1\tivoli\tsm\baclient
set PDSM="C:\Program Files\Tivoli\tsm\baclient\"
set DSMC=dsmadmc.exe -ID=MYTSMADMIN -PASS=XXXXXX -OUTFILE=C:\SBIB\TEMP2.TXT
cd \sbib
del /q KillRec.txt
del /q temp.txt
del /q temp2.txt
del /q temp3.txt
del /q temp4.txt
Echo TSM Kill Reclaimation > temp.txt
date /t >>temp.txt
time /t >>temp.txt
cd %PDSM%
%DSMC% UPDATE STG TAPEDATA REC=100
%DSMC% UPDATE STG COPYPOOL REC=100
%DSMC% select * from processes where PROCESS like '%%Reclamation%%'
cd \sbib
REM save a copy of the reclaimations that are running
echo *** Reclaimations Running *** >temp4.txt
type temp2.txt >> temp4.txt
cd %PDSM%
%DSMC% select PROCESS_NUM from processes where PROCESS like '%%Reclamation%%'
cd \sbib
copy TEMP2.TXT TEMP3.TXT
for /F "eol=A tokens=1* skip=8 " %%i in (TEMP3.TXT) do (
%DSMC% KILL PROC %%i
)
copy temp.txt+temp4.txt KillRec.txt
date /t >>KillRec.txt
time /t >>KillRec.txt
for /F "tokens=2-4 delims=/, " %%i in ('Date /t') do (
copy KillRec.txt Logs\KillRec%%k%%i%%j.txt
)
blat KillRec.txt -Subject TSM-KillReclaimation -to [EMAIL PROTECTED]
del /q KillRec.txt
del /q temp.txt
del /q temp2.txt
del /q temp3.txt
del /q temp4.txt
