ADSM-L

Re: procedure for building a command file for TSM on AIX

2006-12-07 14:35:57
Subject: Re: procedure for building a command file for TSM on AIX
From: Lawrence Clark <Larry_Clark AT THRUWAY.STATE.NY DOT US>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Thu, 7 Dec 2006 14:32:02 -0500
tried it:

[tsmserv] /home/root/bin # dsmc -id=admin -pa=<password> -dataonly xyz
xyz2
ANS1107E Invalid option/value: '-ID'


>>> GLEE AT BSU DOT EDU 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:ADSM-L AT VM.MARIST DOT EDU] On Behalf
Of
Lawrence Clark
Sent: Thursday, December 07, 2006 2:13 PM
To: ADSM-L AT VM.MARIST DOT EDU
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.