ADSM-L

Re: Query to TSM from Perl

2003-04-28 19:59:34
Subject: Re: Query to TSM from Perl
From: Bill Boyer <bill.boyer AT VERIZON DOT NET>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Mon, 28 Apr 2003 19:59:09 -0400
I believe that your @volumes will contain the TSM titles, too. What I do in
my Perl programs is generate my TSM commands into a file and pipe each
command to its own file. That way all I get is the output of that command
and no client titles. Then my call to TSM is:

dsmadmc -id=xxx -pa=xxx -itemcommit -comma macro $macrofile.

In the $macrofile all I have is commands with '>' to a separate file. You
can end up with lots of files, but I only get the data I want, and comma
delimited to boot! Then  I open each file and split(/,/); each line into
variables.

Also, in doing queries, the columes are all in uppercase. Make sure $selpool
is uppercase or use the UPPER() SQL verb.

Bill Boyer
DSS, Inc.

-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU]On Behalf Of
Bill Fitzgerald
Sent: Monday, April 28, 2003 11:43 AM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Query to TSM from Perl


I am trying to write a script that executes dsmadmc and runs a query.

The trouble is that where clause  and the order clause keeps failing.

@volumes=`dsmadmc -id=xxxxxxxx -pass=xxxxxxxx select
volume_name,stgpool_name,devclass_name,est_capacity,pct_utilized,status,
from volumes where stgpool_name = '$selpool' order by $selsort'

Can anyone help me with this?

If you can help please respond to my email address and not the list serv.

William Fitzgerald
Software Programmer
Munson Medical Center
wfitzger AT mhc DOT net

<Prev in Thread] Current Thread [Next in Thread>