Sorry: That's what I get for trying to do it from memory.
Here is the line I use in my scripts. dsmadmc -dataonly=yes -server=server -id=admin -password=pw <query >output Hope this helps. Gary Lee Senior System Programmer Ball State University -----Original Message----- From: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED] On Behalf Of Lawrence Clark Sent: Thursday, December 07, 2006 2:32 PM To: [email protected] Subject: Re: procedure for building a command file for TSM on AIX tried it: [tsmserv] /home/root/bin # dsmc -id=admin -pa=<password> -dataonly xyz xyz2 ANS1107E Invalid option/value: '-ID' >>> [EMAIL PROTECTED] 12/07/06 2:20 PM >>> I would suggest another approach to the problem. Dsmc -id=xx -pa=xxx -dataonly <query >output Where query is a file containing your sql text and output is where you want the output to go. I use this approach and consequently don't have to strip headers or trailers. Hope this helps. Gary Lee Senior System Programmer Ball State University -----Original Message----- From: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED] On Behalf Of Lawrence Clark Sent: Thursday, December 07, 2006 2:13 PM To: [email protected] Subject: procedure for building a command file for TSM on AIX This was a bear trying to get output in a friendly form to execute as a macro. Might be helpful to others. What worked for me: 1). I built the query in one file with redirtection in the command line: /home/root/bin/dsmcmdx "select 'move data', volume_name from volumes where stgpo ol_name='CPSATABG'" > DSMSQLTEXT 2) I have the dsmadmc in another file with the -TAB option: dsmadmc -id=<admin> -pa=<password> -TAB $1 3). I can now strip off the header lines and execute the commands 4). from admin : macro <filename> (must be in current directory admin command line was started from) RESULT: IBM Tivoli Storage Manager Command Line Administrative Interface - Version 5, Release 3, Level 4.0 (c) Copyright by IBM Corporation and other(s) 1990, 2006. All Rights Reserved. Session established with server BACKUP: AIX-RS/6000 Server Version 5, Release 3, Level 3.0 Server date/time: 12/07/06 14:00:25 Last access: 12/07/06 13:59:43 ANS8000I Server command: 'select 'move data' , volume_name from volumes where st gpool_name='CPSATABG'' move data /var/diskpool/satacopyvola/00008EB1.BFS move data /var/diskpool/satacopyvola/00008EB7.BFS move data /var/diskpool/satacopyvola/00008EBD.BFS move data /var/diskpool/satacopyvola/00008EC3.BFS move data /var/diskpool/satacopyvola/00008EC9.BFS move data /var/diskpool/satacopyvola/00008ECF.BFS move data /var/diskpool/satacopyvola/00008ED5.BFS move data /var/diskpool/satacopyvola/00008EDC.BFS move data /var/diskpool/satacopyvola/00008EE2.BFS move data /var/diskpool/satacopyvola/00008EE8.BFS move data /var/diskpool/satacopyvola/00008EEE.BFS move data /var/diskpool/satacopyvola/00008EF4.BFS move data /var/diskpool/satacopyvola/00008EFA.BFS The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain information that is confidential, privileged, and/or otherwise exempt from disclosure under applicable law. If this electronic message is from an attorney or someone in the Legal Department, it may also contain confidential attorney-client communications which may be privileged and protected from disclosure. If you are not the intended recipient, be advised that you have received this message in error and that any use, dissemination, forwarding, printing, or copying is strictly prohibited. Please notify the New York State Thruway Authority immediately by either responding to this e-mail or calling (518) 436-2700, and destroy all copies of this message and any attachments. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain information that is confidential, privileged, and/or otherwise exempt from disclosure under applicable law. If this electronic message is from an attorney or someone in the Legal Department, it may also contain confidential attorney-client communications which may be privileged and protected from disclosure. If you are not the intended recipient, be advised that you have received this message in error and that any use, dissemination, forwarding, printing, or copying is strictly prohibited. Please notify the New York State Thruway Authority immediately by either responding to this e-mail or calling (518) 436-2700, and destroy all copies of this message and any attachments.
