ADSM-L

Re: Formatting SQL select statement output

2000-09-14 16:38:50
Subject: Re: Formatting SQL select statement output
From: Bart Colbert <Bart_Colbert AT RAYONIER DOT COM>
Date: Thu, 14 Sep 2000 16:29:17 -0400
Dave,

The only real formatted output option that I have found that
helps any is a macro command.

create the file
mymacrofile.macro (example)

(contents)
set sqldisplaymode wide
commit
[mycommandhere]
commit

dsmadmc -id=yourid -password=yourpasswd macro "/path/mymacrofile.macro"

Hope this helps.
Bart

Dave wrote:
-----------------------------------------------------------------------
Formatting SQL select statement output
Formatting SQL select statement output
How do I change the output of the column width in a select statement?
Below is a select statement I am currently working on and would like to
expand the message column to something wider than the default 18 chr.

Dave T

ADSM  Version 3
        Release 1
        Level 2.3

select date_time as "Date and Time", message from actlog where msgno=1210
and cast((current_timestamp-date_time)days as decimal(12,0))<1 and
substr(message, 41, 7)='SRVTAPE' or (msgno=0986 and
cast((current_timestamp-date_time)days as decimal(12,0))<1 and
substr(message, 18, 2)=(select substr(message, 97, 2) from actlog where
msgno=1210 and cast((current_timestamp-date_time)days as decimal(12,0))<1
and substr(message, 41, 7)='SRVTAPE'))

     Date and Time     MESSAGE
------------------     ------------------
        2000-09-14     ANR1210I Backup of
        2000-09-14     ANR1210I Backup of
   02:00:17.000000      primary storage
                        pool SRVTAPE to
                        copy storage pool
                        OFFSITE started
                        as process 81.
        2000-09-14     ANR0986I Process
   02:35:00.000000      81 for BACKUP
                        STORAGE POOL
                        running in the
                        BACKGROUND
                        processed 1045
                        items for a total
                        of 10,893,062,729
                        bytes with a
                        completion state
                        of SUCCESS at
                        02:35:00.
<Prev in Thread] Current Thread [Next in Thread>