ADSM-L

Re: SQL Formatting on AIX scripts - SQLDISPLAYMODE

2001-12-03 09:29:12
Subject: Re: SQL Formatting on AIX scripts - SQLDISPLAYMODE
From: Andrew Raibeck <storman AT US.IBM DOT COM>
Date: Mon, 3 Dec 2001 09:26:23 -0500
The SET SQLDISPLAYMODE command only "holds" for a given session. Thus when
the admin session from which you issued that command ends, the next admin
session that issues the SELECT command uses the default SQLDISPLAYMODE.

How about combining your SET SQLDISPLAYMODE and SELECT commands into a
single admin macro file, then using the admin MACRO command to process the
macro? (See the Admin Reference for info about the MACRO command.)

Another formatting issue that you might run across is the case where the
command line displays the information in "list" format (each column of
output is displayed on a single line) when you use the interactive admin
CLI, but when the output is redirected, the information is displayed in
"table" (row-column) format. For this case, have a look at the
-DISPLAYMODE option. You can find more about this option in the Admin
Reference.
Reference.

Regards,

Andy

Andy Raibeck
IBM Software Group
Tivoli Storage Manager Client Development
Internal Notes e-mail: Andrew Raibeck/Tucson/IBM@IBMUS
Internet e-mail: storman AT us.ibm DOT com

The only dumb question is the one that goes unasked.
The command line is your friend.
"Good enough" is the enemy of excellence.




"Pucky, Todd M." <Puckyt AT TIMKEN DOT COM>
Sent by: "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>
12/03/2001 05:44
Please respond to "ADSM: Dist Stor Manager"


        To:     ADSM-L AT VM.MARIST DOT EDU
        cc:
        Subject:        SQL Formatting on AIX scripts - SQLDISPLAYMODE



TSM Server: AIX 4.3.3

I have seen this issue addressed in the adsm archives, but never a clear
answer on how to solve it.  I plan to use a script in a cron job on AIX,
but
I need to have SQLDISPLAYMODE set to WIDE.  Here is the part of my script
where I attempt to set the SQLDISPLAYMODE to WIDE and issue the query.

dsmadmc -id=xxxxxx -pas=xxxxxx "set sqldisplaymode wide"
dsmadmc -id=xxxxxx -pas=xxxxxx "select events.node_name, events.s
tatus, nodes.contact from events, nodes where events.domain_name='SERVER'
and ev
ents.schedule_name='SERVER_0300_0500' and (events.status='Missed' or
events.stat
us='Failed') and events.node_name=nodes.node_name" > $eventtmp

 I have no problems when I issue these commands from the Admin Command
Line,
but through the AIX script I always get SQL format of NARROW in the
results
of my query.  Any suggestions on how to get the SQLDISPLAYMODE WIDE
command
to work in the AIX script would be greatly appreciated.

Thanks

Todd M. Pucky
The Timken Company
Global Information Systems



**********************************************************************
This message and any attachments are intended for the
individual or entity named above. If you are not the intended
recipient, please do not read, copy, use or disclose this
communication to others; also please notify the sender by
replying to this message, and then delete it from your system.

The Timken Company
**********************************************************************