make sure and upd all your tape storage pools to "recl=100" so no reclamation will run also remember that migration & reclamation, etc... will wait until it has finished processing its current file.
#!/bin/ksh # purge all processes and look for still used tape mounts dsmadmc -id=blah -pass=blah q pro 1>/dev/null 2>&1 while [ $? -eq 0 ] do for TSMPROCESS in $(dsmadmc -id=blah -pass=blah q pro | grep ^.......[0-9] | cut -c1-8 | sed /,/s/// ) do dsmadmc -id=blah -pass=blah can pro $TSMPROCESS done sleep 60 dsmadmc -id=blah -pass=blah q pro 1>/dev/null 2>&1 done dsmadmc -id=blah -pass=blah q mount | grep 'IN USE' 1>/dev/null 2>&1 if [ $? -eq 0 ] then echo not all drives idle exit 1 fi exit 0 This should cancel the processes and exit within a minute of their completion, and notify you if something other than a process is using a tape drive, like another backup or a restore... Dwight E. Cook Software Application Engineer III Science Applications International Corporation 509 S. Boston Ave. Suit 220 Tulsa, Oklahoma 74103-4606 Office (918) 732-7109 -----Original Message----- From: MC Matt Cooper (2838) [mailto:[EMAIL PROTECTED]] Sent: Monday, May 13, 2002 9:59 AM To: [EMAIL PROTECTED] Subject: need script to stop all PROCESS's Hello all, I have a need to clear all active processes so I can run a large backup straight to tape. It is a DB2 data warehouse so the only decent way to do this is 5 session to the 5 tape drives. However, the data warehouse backup is initiatated by an out side scheduler so there are occasions where there still are some active Processes running. I want to have a script to stop all the processes but I do not know the PROCESS NUMBERS. So I was wondering if anyone had a script that can stop all the active processes. Thanks in advance Matt