dbTalk Databases Forums  

[Info-Ingres] Screen size ----->> isql etc

comp.databases.ingres comp.databases.ingres


Discuss [Info-Ingres] Screen size ----->> isql etc in the comp.databases.ingres forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
allanb4@iname.com
 
Posts: n/a

Default [Info-Ingres] Screen size ----->> isql etc - 02-13-2009 , 07:25 AM






Does anyone know a way of making isql [abf , rbf etc etc. ] fit the
current screen size (for both width and height)

i.e if the terminal emulator is set to 132 wide x 40 rows high fit to
that screen and not remain at 80 x 24

Unfortunately we are still on Ingres 6.4

thanks Allan


Reply With Quote
  #2  
Old   
Rob McKenzie
 
Posts: n/a

Default Re: [Info-Ingres] Screen size ----->> isql etc - 02-13-2009 , 07:40 AM






Alan,



I don't have an Ingres installation in front of me anymore, but look at the
terminal types. It's been so long that I can't even remember where the term

type definitions are kept etc, but I seem to recall there being one that
would possibly do what you wanted. There was even one that would allow you
to

click on the menu items with a mouse. Troll through the term types for one
that sounds like it might do the job and then set TERM_INGRES to that

type. Maybe I'm all wrong but it's worth a shot.



Cheers,

Rob



_____

From: info-ingres-bounces (AT) kettleriver...ting (DOT) com
[mailto:info-ingres-bounces (AT) kettleriverconsulting (DOT) com] On Behalf Of
allanb4 (AT) iname (DOT) com
Sent: February 13, 2009 8:26 AM
To: info-ingres (AT) kettleriverconsulting (DOT) com
Subject: [Info-Ingres] Screen size ----->> isql etc



Does anyone know a way of making isql [abf , rbf etc etc. ] fit the current
screen size (for both width and height)

i.e if the terminal emulator is set to 132 wide x 40 rows high fit to that
screen and not remain at 80 x 24

Unfortunately we are still on Ingres 6.4

thanks Allan





Reply With Quote
  #3  
Old   
Peter Frost
 
Posts: n/a

Default Re: [Info-Ingres] Screen size ----->> isql etc - 02-13-2009 , 09:33 AM



allanb4 (AT) iname (DOT) com wrote:
Quote:
Does anyone know a way of making isql [abf , rbf etc etc. ] fit the
current screen size (for both width and height)
You'd have to do a little bit of scripting to detect the terminal size
on login and choose the appropriate $TERM_INGRES value (the termcap file
can be found in your Ingres install directory, or at the location
specified by $II_TERMCAP).

There are some "wide" entries in the termcap, though personally I've
found that selecting the right termcap entry is a black art at best...


Reply With Quote
  #4  
Old   
Peter Frost
 
Posts: n/a

Default Re: [Info-Ingres] Screen size ----->> isql etc - 02-13-2009 , 09:38 AM



Peter Frost wrote:
Quote:
There are some "wide" entries in the termcap, though personally I've
found that selecting the right termcap entry is a black art at best...
Ah, reading Rob McKenzie's reply jogged my memory; the "vt100fx"
terminal type, which I use, will in theory cause Ingres to auto-select
the right size. However I've found that it seems to max out at 80
columns; I'm not sure if this is due to my terminal emulator
(gnome-terminal) not sending the correct codes or if it's a problem with
Ingres.

It'll also enable mouse support, which is handy.

Peter


Reply With Quote
  #5  
Old   
Peter Frost
 
Posts: n/a

Default Re: [Info-Ingres] Screen size ----->> isql etc - 02-13-2009 , 09:44 AM



Oh, it's worth mentioning that in my experience the isql query window
itself doesn't seem to be resizable; changing the terminal width only
seems to affect the row of menu options along the bottom of the screen.
Same goes for 'tables'.

Reply With Quote
  #6  
Old   
Grant Croker
 
Posts: n/a

Default Re: [Info-Ingres] Screen size ----->> isql etc - 02-13-2009 , 10:10 AM




On/El 13/02/09 16:44, Peter Frost wrote/escribió:
Quote:
Oh, it's worth mentioning that in my experience the isql query window
itself doesn't seem to be resizable; changing the terminal width only
seems to affect the row of menu options along the bottom of the screen.
Same goes for 'tables'.
Peter,

the number of lines/cols Ingres uses is determined by the co and li
entries in $II_SYSTEM/ingres/files/termcap for the particular value of
TERM_INGRES. For example with vt100f (since vt100fx inherits this
config) li and co are set to 24 and 80, respectively.

One potential solution to having a dynamic window size for
tables/isql/etc. would be to extract the relevant TERM_INGRES from the
termcap file and replace the column and line values with a token that
can be replaced using sed. Then before the call to the FRS application
you wish to run, extract the current rows/columns from the stty command
and replace the tokens in the extracted termcap settings. Using the
environment variable II_TERMCAP_FILE you can override the system termcap
with your new fit to size version. For example:

rows=`stty -a | grep rows | awk 'BEGIN {FS=";"}{ print $2 }' | awk
'{print $2}'`
cols=`stty -a | grep rows | awk 'BEGIN {FS=";"}{ print $3 }' | awk
'{print $2}'`
sed -e "s/%cols%/${cols}/" -e "s/%lines%/${rows}/" ~/termcap_template >
~/termcap
export II_TERMCAP_FILE=~/termcap
export TERM_INGRES=vt100f

Now you can run your FRS command. From some limited testing isql does
not now use the full screen width for the query entry box but the menu
is now wider than before.

regards

grant

--
Grant Croker - Ingres PHP and Ruby maintainer
http://blogs.planetingres.org/grant
It could not be happening because this sort of thing did not happen. Any contradictory evidence could be safely ignored.
-- Terry Pratchett, Jingo




Reply With Quote
  #7  
Old   
Peter Frost
 
Posts: n/a

Default Re: [Info-Ingres] Screen size ----->> isql etc - 02-13-2009 , 10:41 AM



Grant Croker wrote:

Quote:
the number of lines/cols Ingres uses is determined by the co and li
entries in $II_SYSTEM/ingres/files/termcap for the particular value of
TERM_INGRES. For example with vt100f (since vt100fx inherits this
config) li and co are set to 24 and 80, respectively.
Thanks for the info, Grant. However I would point out that according to
the comments in the termcap file the vt100fx definition includes
automatic resizing (I'm not comfortable enough with termcap to be able
to pinpoint the specific entry which does this).

My own testing suggests that this only applies to the menu bar, as you
say - isql doesn't re-size its query window to fit the terminal. It does
however expand the menu bar if you expand the terminal (though only if
you perform the expansion before running isql; it doesn't recover if you
expand whilst isql is running).

Peter


Reply With Quote
  #8  
Old   
Paul Mason
 
Posts: n/a

Default Re: [Info-Ingres] Screen size ----->> isql etc - 02-13-2009 , 11:31 AM



2009/2/13 Peter Frost <pete (AT) www (DOT) scruffbag.nit>

Quote:
Grant Croker wrote:

the number of lines/cols Ingres uses is determined by the co and li
entries in $II_SYSTEM/ingres/files/termcap for the particular value of
TERM_INGRES. For example with vt100f (since vt100fx inherits this
config) li and co are set to 24 and 80, respectively.

Thanks for the info, Grant. However I would point out that according to
the comments in the termcap file the vt100fx definition includes
automatic resizing (I'm not comfortable enough with termcap to be able
to pinpoint the specific entry which does this).

My own testing suggests that this only applies to the menu bar, as you
say - isql doesn't re-size its query window to fit the terminal. It does
however expand the menu bar if you expand the terminal (though only if
you perform the expansion before running isql; it doesn't recover if you
expand whilst isql is running).

Peter

When in the past I've experimented with custom termcap definitions and have
changed li and co I found that, as you say, the query box in isql doesn't
expand, but the output does.

--
Paul Mason



Reply With Quote
  #9  
Old   
Roy Hann
 
Posts: n/a

Default Re: [Info-Ingres] Screen size ----->> isql etc - 02-13-2009 , 01:44 PM



allanb4 (AT) iname (DOT) com wrote:

Quote:
Does anyone know a way of making isql [abf , rbf etc etc. ] fit the
current screen size (for both width and height)

i.e if the terminal emulator is set to 132 wide x 40 rows high fit to
that screen and not remain at 80 x 24

Unfortunately we are still on Ingres 6.4
It can't be done. isql uses FRS forms, and the form is predefined to be
be what it is. You can render it wide or normal or thin, but it's still
going to be 80 characters wide.

Personally I detest isql. Using sql in a DOS window is far more
user-friendly and versatile, and it behaves as you seem to want, plus
you can have vertical and horizontal scroll bars. I have a handout that
is 80% finished, describing how to use it effectively. My experience
from delivering hundreds of courses is that once you see how to use sql
in a DOS window, you never go back. I will try to finish it over the
weekend and post it.

Another possibility is to take advantage of the innumberable third-party
SQL monitors that will work even with Ingres 6.4. For this purpose even
using a Type-1 JDBC driver with ODBC will work well-enough to let you
use things like DBVisualizer or Squirrel.

--
Roy

UK Ingres User Association Conference 2009 will be on Tuesday June 9, 2009
Go to http://www.iua.org.uk/join to get on the mailing list.




Reply With Quote
  #10  
Old   
Laframboise, André
 
Posts: n/a

Default Re: [Info-Ingres] Screen size ----->> isql etc - 02-13-2009 , 02:06 PM




What's a DOS window ?

Using sql in a telnet/command line session is fine too.
Easier to read and Roy is right about scroll bars.

Andre

-----Original Message-----
From: info-ingres-bounces (AT) kettleriver...ting (DOT) com [mailto:info-ingres-bounces (AT) kettleriverconsulting (DOT) com] On Behalf Of Roy Hann
Sent: February 13, 2009 2:45 PM
To: info-ingres (AT) kettleriverconsulting (DOT) com
Subject: Re: [Info-Ingres] Screen size ----->> isql etc

allanb4 (AT) iname (DOT) com wrote:

Quote:
Does anyone know a way of making isql [abf , rbf etc etc. ] fit the
current screen size (for both width and height)

i.e if the terminal emulator is set to 132 wide x 40 rows high fit to
that screen and not remain at 80 x 24

Unfortunately we are still on Ingres 6.4
It can't be done. isql uses FRS forms, and the form is predefined to be be what it is. You can render it wide or normal or thin, but it's still going to be 80 characters wide.

Personally I detest isql. Using sql in a DOS window is far more user-friendly and versatile, and it behaves as you seem to want, plus you can have vertical and horizontal scroll bars. I have a handout that is 80% finished, describing how to use it effectively. My experience from delivering hundreds of courses is that once you see how to use sql in a DOS window, you never go back. I will try to finish it over the weekend and post it.

Another possibility is to take advantage of the innumberable third-party SQL monitors that will work even with Ingres 6.4. For this purpose even using a Type-1 JDBC driver with ODBC will work well-enough to let you use things like DBVisualizer or Squirrel.

--
Roy

UK Ingres User Association Conference 2009 will be on Tuesday June 9, 2009 Go to http://www.iua.org.uk/join to get on the mailing list.


_______________________________________________
Info-Ingres mailing list
Info-Ingres (AT) kettleriverconsulting (DOT) com
http://www.kettleriverconsulting.com...fo/info-ingres



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.