Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Dbaccess output formatting

551 views
Skip to first unread message

Mark D. Stock

unread,
Nov 4, 1996, 3:00:00 AM11/4/96
to

Frank Dickinson wrote:
>
> Can anyone point me in the right direction on how to control the
> output of dbaccess. Sometimes it produces output that is
> presented accross the page, other times it produces output down
> the page. What logic is it following?

It's based on the width of the screen. As soon as a horizontal format no
longer fits, it reverts to a vertical format.

If you have very long column names then you can alter this effect by giving
these columns alias names, such as:

SELECT a_very_long_name avln, nother_v_long_name nvln
FROM table

If you have very long character fields, you can truncate them using the
substring syntax:

SELECT long_char[1,20], nother_long_char[1,5]
FROM table

And of course you can combine the two.

Hope that helps,
--

Mark.

+-------------------------------------------------------------------------+
|Mark D. Stock - The West Solutions Group http://www.west.co.za |
| The Informix FAQ is at http://www.iiug.org |
|mailto:ma...@west.co.za +------------------------------------------------+
|Tel: +27 11 803 2151 |If it doesn't work... force it! |
|Fax: +27 11 803 2189 |If it breaks... it needed replacing anyway! |
|Cell: +27 83 250 2325 |Well, that's how I code anyway! |
+------------------------+------------------------------------------------+


Nils Myklebust

unread,
Nov 5, 1996, 3:00:00 AM11/5/96
to

Frank Dickinson <fr...@gate.net> wrote:

:Can anyone point me in the right direction on how to control the
:output of dbaccess. Sometimes it produces output that is
:presented accross the page, other times it produces output down
:the page. What logic is it following?

When there is space for the output within 80 characters the output is
displayed across. When it would need more than 80 characters it
displays down the page.
I haven't ever tried it on a terminal set to more than 80 characters
across. May be it will display across the page up to the with of the
terminal. I doubt that though.
Even when outputing to a file it does the same thing.


Nils.My...@idg.no
NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway
My opinions are those of my company

Daniel Martin

unread,
Nov 5, 1996, 3:00:00 AM11/5/96
to

THe best way I've found to deal with display issues of SELECTed dbaccess
data is to UNLOAD what I want to a system file (e.g., /tmp/data.dat) and
then write an awk script to format the output. Not that awk is too easy,
but it's a lot more powerful and flexible than the Informix ACE report
writer. Check out comp.lang.awk for more info.
-Daniel


+------------------------------------------------------------------+
| Striving to be what the liberals call a "tax-cuts-for-the-rich, |
| mean-spirited, intolerant, radical, religious-right, extremist" |
+------------------------------------------------------------------+

Walt Hultgren {rmy}

unread,
Nov 6, 1996, 3:00:00 AM11/6/96
to

Check:

ftp://ftp.iiug.org/pub/informix/pub/reform_sql.Z
http://www.iiug.org/software/software_index.html

for one approach to reformatting isql/dbaccess output.

Walt.

--
Walt Hultgren Internet: wa...@rmy.emory.edu (IP 170.140.97.4)
Emory University UUCP: {...,gatech,rutgers,uunet}!emory!rmy!walt
954 Gatewood Road, NE BITNET: walt@EMORY
Atlanta, GA 30329 USA Voice: +1 404 727 0648

0 new messages