ADSM-L

DSMADMC SQL SELECT on Windows and SQLDISPLAYMODE

2001-02-03 13:58:40
Subject: DSMADMC SQL SELECT on Windows and SQLDISPLAYMODE
From: "Talafous, John G." <Talafous AT TIMKEN DOT COM>
Date: Sat, 3 Feb 2001 14:00:21 -0500
Greetings,
  I run the TSM Administrative Command line interface on Windows. I use
batch/command files to perform a number of functions. I could use some help
in formatting the output of the SQL SELECT statement.
  In this case, what I am trying to do is track tape drive utilization in
order to better understand the impact of the TSM administrative schedules
like storage pool backup and reclamation. So, I start with this SQL select
statement:

select date_time,message from actlog where msgno in (8337,8468)

and the results look like this:

         DATE_TIME     MESSAGE
------------------     ------------------
        2001-01-02     ANR8337I 3590
        2001-01-02     ANR8337I 3590
   00:02:54.000000      volume K20252
                        mounted in drive
                        3590DRIVE2
                        (/dev/rmt2).

Now I need to set SQLDISPLAYMODE wide and use the SELECT variable_name AS
option to try to spread this out. So, I use redirection in Windows to pump
multiple commands into DSMADMC to issue a SET SQL DISPLAYMODE WIDE command
before the SQL SELECT command. I also change the SELECT to select MESSAGE AS
and the results are:

set sqldisplaymode wide
select date_time,message as "Message_text_________________________" from
actlog where msgno in (8337,8468)
                            DATE_TIME: 2001-01-02 00:02:54.000000
Message_text_________________________: ANR8337I 3590 volume K20252 mounted
in
                                        drive 3590DRIVE2 (/dev/rmt2).

I must add that while this is running, not only is the output being
redirected into a file but I am also seeing it scroll on the monitor.
Well, this isn't quite right, so I use the -displaymode=table option on
DSMADSC and I get:

set sqldisplaymode wide
select date_time,message as "Message_text_________________________" from
actlog where msgno in (8337,8468)
                 DATE_TIMEMessage_text_________________________

----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
------------------------------------------------
------------------------------------------------
2001-01-02 00:02:54.000000ANR8337I 3590 volume K20252 mounted in drive
2001-01-02 00:02:54.000000ANR8337I 3590 volume K20252 mounted in drive
3590DRIVE2 (/dev/rmt2).

A little bit better, but strange. Am I the only one that is struggling with
this SQL formatting concept?

  Is there a DSMADMC startup parameter like '-outfile' that is equivalent to
SET SQLDISPLAYMODE WIDE? What are others doing to provide decent output from
a DSMADMC SQL SELECT and Windows?"

John G. Talafous              IS Technical Principal
The Timken Company            Global Software Support
P.O. Box 6927                 Data Management
1835 Dueber Ave. S.W.         Phone: (330)-471-3390
Canton, Ohio USA  44706-0927  Fax  : (330)-471-4034
talafous AT timken DOT com           http://www.timken.com
<Prev in Thread] Current Thread [Next in Thread>