select 'ustsm07:del vol', cast((volume_name)as char(8)) as VOLNAME, from volumes where pct_utilized=0 and devclass_name <> 'DISK'
ustsm07:del vol K00525
ustsm07:del vol K00526
ustsm07:del vol J00789
ustsm07:del vol J00197
ustsm07:del vol J00303
ustsm07:del vol J01172
ustsm07:del vol J01233
ustsm07:del vol J00850
ustsm07:del vol J00861
ustsm07:del vol K00018
ustsm07:del vol J01613
ustsm07:del vol J01624
ustsm07:del vol J01671
ustsm07:del vol J01687
ustsm07:del vol K00116
ustsm07:del vol K00130
ustsm07:del vol K00340
ustsm07:del vol K00348
tsm: USTSM07>USTSM07:del vol K00525
ANR1699I Resolved USTSM07 to 1 server(s) - issuing command DEL VOL K00525 against server(s).
ANR1687I Output for command 'DEL VOL K00525' issued against server USTSM07 follows:
ANR2208I Volume K00525 deleted from storage pool TAPE_A.
ANR1688I Output for command 'DEL VOL K00525' issued against server USTSM07 completed.
ANR1694I Server USTSM07 processed command 'DEL VOL K00525' and completed successfully.
ANR1697I Command 'DEL VOL K00525 processed by 1 server(s): 1 successful, 0 with warnings, and 0 with errors.
On unix, anyway, if you pipe dsmadmc into another command, it won't prompt for anything at all (always seems to imply YES answers to the questions it would have asked, and disables the pager):ReplyDelete
dsmadmc -id=whatever -pass=whatever "audit volume whatever" |cat
for instance. We have a standard shell script we use to strip out all the header/login cruft, and dsmadmc *always* gets piped into that to clean up the output, so we never get prompted :)
macro command does not need confirmation as well. and you can run this from tsm cmd line.
good command for generation tsm command to macro file is "set sqldisplaymode w" before you use select to redirect output to file. Than you can use macro cmd.
Yeah those work but I save my command as a TSM admin script and then just cut and paste it into the command in a batch and it runs. I can be lazy at times so this way is quick and easy. I like those other options and will remember to use them when needing to do similar items through a shell script.ReplyDelete