• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

How to Inherit stty rows/columns values during Progress startup?

#1
How do I get Progress to inherit the values in the stty rows and columns, so I would get 48 rows and 132 columns for example.

When I fire up _progres in Unix, the Editor fills only half of the screen (24 x 80).

Thanks,
gummbeey
Progress 9.1c
 
#2
How do I get Progress to inherit the values in the stty rows and columns, so I would get 48 rows and 132 columns for example.

When I fire up _progres in Unix, the Editor fills only half of the screen (24 x 80).
You need to modify $PROTERMCAP file. Find your terminal section in there and change or add the following lines:

Code:
 :co#132:\
 :li#48:\
There's a way to change terminal type using TERMINAL function in 4GL, but I think the previous solution is better because there might be significant differences between terminal types.

HTH
 
#3
If you remove the li# and co# capabilities from the PROTERMCAP entry Progress will look to the stty settings at startup. It will not change them after startup though.

Be sure to follow any "tc" capabilities for additional sources of li# & co#...

Make a copy of PROTERMCAP and use the PROTERMCAP environment variable to test this -- you can really mess up your system with a slip of the thumb:

export PROTERMCAP=ptcapx
 
#4
Unfortunately the technique above does not work on all versions and all platforms. I know that it does work on Linux with v9.1d08 and 10.1a.

It does not work on AIX v9.1d07.

I haven't tested any others.
 
#5
If you remove the li# and co# capabilities from the PROTERMCAP entry Progress will look to the stty settings at startup. It will not change them after startup though.
It can be done with 'ws' PROTERMCAP parameter as well. PKB says

ws
BOOLEAN
Uses the device /dev /tty for the current port to determine the number of columns and rows for the terminal. Meaningful primarily for emulated terminals in a windowing system (that is, xterm). If successful, overrides co and li; otherwise, defaults to co and li. OpenEdge will not automatically resize if the size of the terminal changes after initialization.
You should add ':ws:\' in your terminal section in $PROTERMCAP, but I haven't tried.
 
#6
Ah! Thanks... That explains why it was only working for xterm and terminals that "tc=xterm".

Works on Linux & Sun.

Doesn't work on AIX (at least not for 9.1d)

I don't have an HPUX login handy.
 
#7
I'm still not able to do 132 column, but I was able to do it with 48 rows.
I tried all the suggestions here but no luck.

Heres what I did.

1) I pointed my PROTERMCAP file in my .profile like this.

PROTERMCAP=/tmp/protermcap2.dg


2) I modified protermcap2.dg many ways. I tried forcing 48 x 132, I tried ws, I tried both but no luck.

# note that we are assuming auto-wrap mode.
# This terminal is Supported by PROGRESS.
V1|vt100|vt100-80|vt100_series|DEC VT-100 running in ansi mode:\
blah blah blah
:ws:\
#:co#80:\
#:co#132:\
blah blah blah
#:li#24:\
#:li#48:\
blah blah blah
:tc=v7kf:


3) I fired up my terminal emulator NetTerm Client using VT100 emulation. If I type stty, I see rows=48, col=132. But when I fire up _progress, the Progress Editor cuts the screen and columns back to 80.
 
#9
bulklodd said:
what does 4gl code 'message term.' display?
vt100

I should also point out that I have to fire up _progres twice. The first time around, the screen is all messed up, not aligned and all that. So I quit out, and go back in and it comes out 48 x 80 neatly.
 
#14
I got this when I tried it..

Unable to use your terminal. Check your PROTERMCAP file. (443)
** Could not find terminal type vt100-132 in file /tmp/protermcap2.dg. (146)



So I added the vt100-132 in the protermcap in the list like this..

BEFORE
V1|vt100|vt100-80|vt100_series|DEC VT-100 running in ansi mode:\

AFTER
V1|vt100|vt100-80|vt100-132|vt100_series|DEC VT-100 running in ansi mode:\

And I'm back to the original problem.



Can you paste your vt100-132 section of your protermcap file here?
 
#17
Just for reference (since the problem is now solved...) many PROTERMCAP entries go crazy with the init & termination strings. I always get rid of that stuff. It makes life much simpler ;-)
 
#18
Ok, this seems to work if I start progress from scratch. What about switching modes during a session.

For example I have one screen that displays much better as a 132 column screen (no wrapping needed). But when I issue a 'terminal = "vt420w".' command within the application I get a 132 column screen with an 80 column frame.
 
#19
Mike Smith said:
Ok, this seems to work if I start progress from scratch. What about switching modes during a session.
Assuming this PROTERMCAP stuff (I've never used it) is environment variable related, changes to environment variables via 4GL cannot be reflected in current session, either on Windows or Unix.
 
#20
It's not really about environment variables although TERM and PROTERMCAP are used to initialize the terminal type and location of protermcap when progress starts up. After startup they don't matter. The protermcap file itself contains entries for the various terminals that you might be running in a character session. Each entry consists of a series of "capabilities" such as "li", "co" and "ws" that describe how the terminal works.

My usual goal with protermcap is to reduce it to the smallest set of entries with the smallest set of capabilities that works for me. It's something that I futz with for some reason or other every couple of years. It's all rather arcane ;) but something that we walking fossils like to fiddle with from time to time...