Don't forget the spaces.. you need an ending space on UPD VOL and a beginning for ACC=READONLY or it will all be lumped together.
select 'upd vol ', volume_name, ' acc=readonly' from volumes where stgpool_name like 'TAPE_NDMP%_OFFSITE' You also might need to run SET SQLDISPLAYMODE WIDE or the column will wrap on the display. Bill Boyer "There are 10 types of people in the world. Those that understand binary and those that don't" - ?? -----Original Message----- From: ADSM: Dist Stor Manager [mailto:ads...@vm.marist.edu] On Behalf Of Huebschman, George J. Sent: Wednesday, February 25, 2009 10:03 AM To: ADSM-L@VM.MARIST.EDU Subject: Re: How to produce a usable script? select 'upd vol', volume_name, 'acc=readonly' from volumes where stgpool_name like 'TAPE_NDMP%_OFFSITE' -----Original Message----- From: ADSM: Dist Stor Manager [mailto:ads...@vm.marist.edu] On Behalf Of Moyer, Joni M Sent: Wednesday, February 25, 2009 9:58 AM To: ADSM-L@VM.MARIST.EDU Subject: [ADSM-L] How to produce a usable script? Hi Everyone, I have a script that I have created that provides me with a particular listing of backup tapes: select volume_name from volumes where stgpool_name like 'TAPE_NDMP%_OFFSITE' order by volume_name I would then like to take the results of this script and create another script that could be run if needed so that it looks like the following: upd vol xxxxxx acc=readonly Does anyone know how I could do this? Thanks in advance!!!! Joni Moyer Storage Administrator III (717)302-9966 joni.mo...@highmark.com ________________________________ This e-mail and any attachments to it are confidential and are intended solely for use of the individual or entity to whom they are addressed. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not keep, use, disclose, copy or distribute this e-mail without the author's prior permission. The views expressed in this e-mail message do not necessarily represent the views of Highmark Inc., its subsidiaries, or affiliates. IMPORTANT: E-mail sent through the Internet is not secure and timely delivery of Internet mail is not guaranteed. Legg Mason therefore, recommends that you do not send any action-oriented or time-sensitive information to us via electronic mail, or any confidential or sensitive information including: social security numbers, account numbers, or personal identification numbers. This message is intended for the addressee only and may contain privileged or confidential information. Unless you are the intended recipient, you may not use, copy or disclose to anyone any information contained in this message. If you have received this message in error, please notify the author by replying to this message and then kindly delete the message. Thank you.