1. 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?

Discussion in 'Development' started by gummbeey, May 18, 2006.

  1. gummbeey

    gummbeey New Member

    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).

    Progress 9.1c
  3. bulklodd

    bulklodd New Member

    You need to modify $PROTERMCAP file. Find your terminal section in there and change or add the following lines:

    Code (progress):
    2.  :co#132:\
    3.  :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.

  4. TomBascom

    TomBascom Curmudgeon

    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
  5. TomBascom

    TomBascom Curmudgeon

    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.
  6. bulklodd

    bulklodd New Member

    It can be done with 'ws' PROTERMCAP parameter as well. PKB says

    You should add ':ws:\' in your terminal section in $PROTERMCAP, but I haven't tried.
  7. TomBascom

    TomBascom Curmudgeon

    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.
  8. gummbeey

    gummbeey New Member

    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.


    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
    blah blah blah
    blah blah blah

    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

    bulklodd New Member

    what does 4gl code 'message term.' display?
  10. gummbeey

    gummbeey New Member


    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.
  11. bulklodd

    bulklodd New Member

    and what about 'echo $TERM'?
  12. gummbeey

    gummbeey New Member

    vt100 as well
  13. bulklodd

    bulklodd New Member

    i've checked with vt100 and got the same problem. looks like a hitch
  14. bulklodd

    bulklodd New Member

    i've changed TERM's value into 'vt100-132' and it works.

    Code (progress):
    2. TERM=vt100-132
    3. export TERM
  15. gummbeey

    gummbeey New Member

    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..

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

    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?
  16. bulklodd

    bulklodd New Member

    there you are

  17. gummbeey

    gummbeey New Member


    Thanks a bunch!!
  18. TomBascom

    TomBascom Curmudgeon

    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 ;-)
  19. Mike Smith

    Mike Smith New Member

    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.
  20. Lee Curzon

    Lee Curzon New Member

    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.
  21. TomBascom

    TomBascom Curmudgeon

    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...

Share This Page