Re: Script
2004-09-16 15:28:42
Ok, this is a 'TSM Kill Reclaimations' batch file for windows that can be
run from the Windows 'scheduled tasks' or from the TSM scheduler as a batch
file.
It uses a directory C:\WORK and C:\WORK\Logs\ This script goes into
C:\WORK
The Admin ID and Password should be better protected, but such is life in a
test environment.
It also uses a shareware program called BLAT. Google it, if you want to
e-mail your admins. Put their e-mail addresses in a file
c:\work\tsmadmns.txt - read the install for blat, it is easy, but it must be
done to work.
I hope this helps someone else.
@Echo Off
REM TSMKillReclaimation.cmd - 20040916 jcoats - based a thread in the ADSM-L
list
set PATH=%PATH%;c:\Progra~1\tivoli\tsm\baclient
set PDSM="C:\Program Files\Tivoli\tsm\baclient\"
set DSMC=dsmadmc.exe -ID=ADMIN -PASS=ADMIN -OUTFILE=C:\WORK\TEMP2.TXT
cd \WORK
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 -tf administrators.txt
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> |
- Script, Loon, E.J. van - SPLXM
- Re: Script, Coats, Jack
- Re: Script, Loon, E.J. van - SPLXM
- Re: Script, Alexander Verkooijen
- Re: Script, Ben Bullock
- Re: Script, Bill Dourado
- Re: Script, Taw.Raymond
- Re: Script,
Coats, Jack <=
|
|
|