Hi Rachel First, the SQL language used in TSM is not TSM specific. Therefore, the command move, which is not a SQL command, cannot be used in an SQL statement.
Second, as far as I know, you cant use resultlists from SQL statements and pass these on to TSM internal commands without using any form of external scripting like ksh scripting. Depending on the platform you're using, you could use some form of external scripting tool, like command scripting on the Windows platform or KSH scripting on AIX to accomplish what you're looking for. One small question though; why do you want to move your backup tapes? Cause this is what I guess you're looking for, a way to find out which tapes were used, and the move them out of the library. In that case, the use of copy storagepools would probably be alot better, as copy pools have these capabilities built-in. Best Regards Daniel Sparrman ----------------------------------- Daniel Sparrman Chef Utveckling & Drift Exist i Stockholm AB Propellervägen 6B 183 62 TÄBY Växel: 08 - 754 98 00 Mobil: 070 - 399 27 51 "Smith, Rachel" <[EMAIL PROTECTED]> Sent by: "ADSM: Dist Stor Manager" <[EMAIL PROTECTED]> 2004-10-07 15:29 Please respond to "ADSM: Dist Stor Manager" <[EMAIL PROTECTED]> To [EMAIL PROTECTED] cc Subject Re: select command Hi, the option below worked, thanks for that. But is there a way to send the output from the select command to issue the move command to checkout tapes? select volume_name from volhistory where Date(date_time)=date(current_timestamp) type='BACKUPFULL' location<>'VAULT' move drmedia * tost=vault Thanks again:) -----Original Message----- From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU <mailto:ADSM-L AT VM.MARIST DOT EDU> ] On Behalf Of Das, Samiran (IDS ECCS) Sent: Wednesday, October 06, 2004 12:19 PM To: ADSM-L AT VM.MARIST DOT EDU <mailto:ADSM-L AT VM.MARIST DOT EDU> Subject: Re: select command Or this one if you want to see volumes from today's backup. select volume_name from volhistory where Date(date_time)=3Ddate(current_timestamp) and type in ('BACKUPFULL','BACKUPINCR') Or may be a simpler one. Q volhist begind=3Dtoday type=3Ddbb Regards, Samiran Das -----Original Message----- From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU <mailto:ADSM-L AT VM.MARIST DOT EDU> ] On Behalf Of Das, Samiran (IDS ECCS) Sent: Wednesday, October 06, 2004 12:19 PM To: ADSM-L AT VM.MARIST DOT EDU <mailto:ADSM-L AT VM.MARIST DOT EDU> Subject: Re: select command Rachel, Try this select query. select volume_name from volhistory where date_time<timestamp(date(current_timestamp),'00:00') and type in ('BACKUPFULL','BACKUPINCR') Following pdf By Andrew Reibeck is the best place to start with tsm sql. http://www-dat.lrz.de/dat/8/asys/doc/tsmserv/adsmserv-sql/doc/pdf/adsm_s <http://www-dat.lrz.de/dat/8/asys/doc/tsmserv/adsmserv-sql/doc/pdf/adsm_ s> ql.pdf Regards, Samiran Das -----Original Message----- From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU <mailto:ADSM-L AT VM.MARIST DOT EDU> ] On Behalf Of Smith, Rachel Sent: Wednesday, October 06, 2004 11:31 AM To: ADSM-L AT VM.MARIST DOT EDU <mailto:ADSM-L AT VM.MARIST DOT EDU> Subject: select command Hi, =20 I am trying to complete a select command to "select volume_name from volhistory where type=3D'backupfull' and date_time>'today'" which fails because today is incorrect, can you tell me the correct format. Also when the above runs successfully, I will require it to use the out but from the select command to move the media to tost=3Dvault. =20 Any ideas on how to do this or a web site that helps us understand SQL better? =20 Thanks..=20 -------------------------------------------------------- =20 If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Click here for important additional terms relating to this e-mail. http://www.ml.com/email_terms/=20 <http://www.ml.com/email_terms/=20> --------------------------------------------------------=20 -------------------------------------------------------- =20 If you are not an intended recipient of this e-mail, please notify the = sender, delete it and do not read, act upon, print, disclose, copy, = retain or redistribute it. Click here for important additional terms = relating to this e-mail. http://www.ml.com/email_terms/=20 <http://www.ml.com/email_terms/=20> -------------------------------------------------------- =20