ADSM-L

Canceling Migrations

2004-11-23 07:53:17
Subject: Canceling Migrations
From: "Coats, Jack" <Jack.Coats AT BANKSTERLING DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Tue, 23 Nov 2004 06:53:00 -0600
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 XXXX AT xxxx DOT com





del /q KillRec.txt

del /q temp.txt

del /q temp2.txt

del /q temp3.txt

del /q temp4.txt

<Prev in Thread] Current Thread [Next in Thread>