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

Openedge Procedure editor in Unix

Discussion in 'Development' started by kblackwel, Sep 19, 2012.

  1. kblackwel

    kblackwel New Member

    Is there any way to increase the windows size of the Procedure editor for Openedge 10.1B running on AIX Unix?

    If I full screen my putty session, the procedure editor only takes up a small area of the screen.
  3. Rob Fitzpatrick

    Rob Fitzpatrick ProgressTalk.com Sponsor

    You can look in the $DLC/protermcap, and compare it against your shell's terminal emulation. There is some mention of this in the Installation and Configuration manual. I assume you're using an ssh client like PuTTY or something similar; check its settings as well.

    Having said that, I do run full-screen editors in PuTTY on various *nixes, so it is possible. Sorry I can't assist you much, as I usually have others who do installation (with varying degrees of success). Terminal emulation is a bit of a black art to me.
  4. kblackwel

    kblackwel New Member

    I wanted to upload an image of the problem I'm having.

    I've tried ever emulation that has co#132 li#42 with no success.


    Attached Files:

    • PE.jpg
      File size:
      18.1 KB
  5. Rob Fitzpatrick

    Rob Fitzpatrick ProgressTalk.com Sponsor

    Which shell are you using?
  6. TomBascom

    TomBascom Curmudgeon

    This is all about protermcap.

    Your TERM variable is matched to an entry in protermcap.

    In the most general case the "li" and "co" attributes of that entry control the number of lines and columns that Progress thinks your terminal has. For instance the standard vt100 entry looks like this (I have helpfully indicated the relevant attributes in red:

    Code (progress):
    2. V1|[B][COLOR="#FF0000"]vt100[/COLOR][/B]|VT100|vt100-80|vt100_series|DEC VT-100:\
    3.         :START-RESIZE(ESC-1)=\E1:\
    4.         :GO(F1)=\E[11:\
    5.         :GO(CTRL-X)=^x:\
    6.         :HELP(F2)=\E[12:\
    7.         :ENTER-MENUBAR(F3)=\E[13:\
    8.         :END-ERROR(F4)=\E[14:\
    9.         :GET(F5)=\E[15:\
    10.         :PUT(F6)=\E[17:\
    11.         :RECALL(F7)=\E[18:\
    12.         :CLEAR(F8)=\E[19:\
    13.         :CLEAR(CTRL-Z)=^z:\
    14.         :INSERT-MODE(CTRL-T)=^t:\
    15.         :CUT(F10)=\E[21:\
    16.         :COPY(F11)=\E[23:\
    17.         :PASTE(F12)=\E[24:\
    18.         :BACKSPACE(DEL-CHAR)=\EW:\
    19.         :BLOCK(CTRL-V)=^v:\
    20.         :HOME(ESC-<)=\E<:\
    21.         :END(ESC->)=\E>:\
    22.         :is=\E>\E[?3l\E[?4l\E[m\E[?7h\E[?8h\E(B\E)0:\
    23.         :nd=2\E[C:\
    24.         :do=\E[B:\
    25.         :cl=50\E[;H\E[2J:\
    26.         :cm=5\E[%i%d;%dH:\
    27.         :so=2\E[7m:\
    28.         :DELETE-COLUMN(ESC-CTRL-Z)=\E[4:\
    29.         :END(END)=\E[5:\
    30.         :se=2\E[m:\
    31.         :us=2\E[4m:\
    32.         :ue=2\E[m:\
    33.         :GS=^N:\
    34.         :GE=^O:\
    35.         :G1=k:\
    36.         :G2=l:\
    37.         :G3=m:\
    38.         :G4=j:\
    39.         :GC=n:\
    40.         :GD=w:\
    41.         :GH=q:\
    42.         :GL=u:\
    43.         :GR=t:\
    44.         :GU=v:\
    45.         :GV=x:\
    46.         :HS=2\E[1m:\
    47.         :HR=2\E[m:\
    48.         :BB=2\E[5m:\
    49.         :BR=2\E[m:\
    50.         :ks=\E[?1h\E=:\
    51.         :ke=\E[?1l\E>:\
    52.         :cd=10\E[J:\
    53.         :ce=10\E[K:\
    54.         [B][COLOR="#FF0000"]:co#80:[/COLOR][/B]\
    55.         :kd=\E[B:\
    56.         :kl=\E[D:\
    57.         :kr=\E[C:\
    58.         :ku=\E[A:\
    59.         [B][COLOR="#FF0000"]:li#24:[/COLOR][/B]\
    60.         :up=\E[A:\
    61.         :xi:\
    62.         :cs=\E[%i%d;%dr:\
    63.         :sr=\EM:\
    64.         :sf=\n:\
    65.         :GO(PF1)=\EOP:\
    66.         :HELP(PF2)=\EOQ:\
    67.         :ENTER-MENUBAR(PF3)=\EOR:\
    68.         :END-ERROR(PF4)=\EOS:\
    69.         :PAGE-UP(ESC-UP-ARROW)=\E\E[A:\
    70.         :PAGE-DOWN(ESC-DOWN-ARROW)=\E\E[B:\
    71.         :LEFT-END(ESC-LEFT-ARROW)=\E\E[D:\
    72.         :RIGHT-END(ESC-RIGHT-ARROW)=\E\E[C:\
    73.         :ku=\E[A:       :L_ku=<Up>:\
    74.         :kd=\E[B:       :L_kd=<Down>:\
    75.         :kr=\E[C:       :L_kr=<Right>:\
    76.         :kl=\E[D:       :L_kl=<Left>:\
    77.         :bc=\177:       :.L_bc:\
    78.         :kh=\Eh:        :L_kh=<ESC> h:\
    79.         :EN=\Ee:        :L_EN=<ESC> e:\
    80.         :PU=^U:         :L_PU=<CTRL-U>:\
    81.         :PD=^K:         :L_PD=<CTRL-D>:\
    82.         :ki=\Ei:        :L_ki=<ESC> i:\
    83.         :DL=^X:         :L_DL=<CTRL-X>:\
    84.         :ESC=\E\E:      :L_ESC=<ESC> <ESC>:\
    85.         :bt=\Eb:        :L_bt=<ESC> b:\
    86.         :fk4=\EOP:      :L_fk4=<PF1>:\
    87.         :fk1=\EOQ:      :L_fk1=<PF2>:\
    88.         :fk2=\EOR:      :L_fk2=<PF3>:\
    89.         :fk3=\EOS:      :L_fk3=<PF4>:\
    90.         :fk5=\E6:       :L_fk5=<ESC> 6:\
    91.         :fk6=\E7:       :L_fk6=<ESC> 7:\
    92.         :fk7=\E8:       :L_fk7=<ESC> 8:\
    93.         :Aka=^k:      :L_Aka=Ctrl-K:\
    94.         :Akd=^z:      :L_Akd=Ctrl-Z:\
    95.         :Akp=^r:      :L_Akp=Ctrl-R:\
    96.         :Aks=^l:      :L_Aks=Ctrl-L:\
    97.         :Aku=\Em:      :L_Aku=Esc-M:\
    98.         :Akw=^g:      :L_Akw=Ctrl-G:\
    99.         :Aki=^e:      :L_Aki=Ctrl-E:\
    100.         [B][COLOR="#FF0000"]:tc=v7kf:[/COLOR][/B]
    Depending on Progress version and OS there might be a "ws" entry and it might allow Progress to pick up the terminal size from "stty" settings at the time the session starts (dynamic resizing is not supported).

    So, if you want a custom window size you need to decide what the terminal is going to be called and arrange for the TERM variable to have that value. (You probably do NOT want to change everyone else's vt100 or xterm...)

    For instance, I often use "xterm-tw" to indicate "a copy of xterm that is tall and wide" and change li to 48 and co to 132.

    Or -- you can make a copy of protermcap and use the PROTERMCAP environment variable to point to it:

    Code (progress):
    2. PROTERMCAP=/home/tom/ptcap.tom
    3. export PROTERMCAP
    Then edit the entry you want to customize to suit your needs. This has the advantage of not messing up anyone else if you fat finger your edits.

    Simple really.
  7. darrellwoodard

    darrellwoodard New Member

    Other than the protermcap what else can cause differences?
    I have 2 unix servers and on one the editor takes up the whole screen but on the other, it only uses half the screen.
    I did a file compare on the protermcap files from both and they are the same.
    So what else is there?
  8. TomBascom

    TomBascom Curmudgeon

    I happen to know that you are using PuTTY ;)

    You probably need to tweak your PuTTY settings.

    Your two servers are setup as distinct PuTTY "Saved Sessions" right?


    a) open PuTTY with no arguments


    b) using an existing open session, right-click the window icon (upper left corner of the window) and select "Change Settings"

    There are a couple of things to look at:

    1) The "Window" options have Columns & Rows -- personally I despise 80x24 and always set this to a minimum of 132x48. (It has only been 30 years since *everyone* has had hardware perfectly capable of comfortably displaying more than 80x24. But I digress...) The other thing to look at are the "When the window is resized" options. Progress sessions do NOT like to be resized. Your screen will become very confused if you resize it while Progress is running. So you probably want the "change the size of the font" option enabled.

    2) "Appearance" is where you set the font size. If the rows & columns are set the same then the most likely cause of differing screen sizes is that you have different font sizes in use. Click the "Change..." button and pick a better font. BTW -- the default fonts are ugly. I like "Consolas".

    If you make changes make sure to save them -- go back to "Session", highlight the correct session and click "Save" for best results. (It is also best to only have this one PuTTY session running when you do that.) Then restart PuTTY and verify that your changes have been saved.


    When freshly installing PuTTY immediately go to the "Default Settings" and take care of things like the default rows & columns, font, keyboard behaviours, and screen colors. This is *much* better than doing it session by session as you create them.
  9. darrellwoodard

    darrellwoodard New Member

    I compared EVERY Putty Setting and they are exactly the same (I knew they would be because I copied one to the other).
    I did login using PowerTerm and the editor on both servers acted the same and took up the full screen.
    Still baffled on why Putty acts differently even though ALL of the Putty settings are the same.
  10. TomBascom

    TomBascom Curmudgeon

    If the PuTTY settings and the protermcaps are identical then the behaviour should also be the same. It is not, therefore *something* is different.

    How do you copy one PuTTY to another? That is not an operation that I am familiar with and I don't know of any copy capability within PuTTY. Do you perhaps mean that you copied the icon? If you did that then I would think you also modified the properties to change the target server name? If that is correct then it is really important to realize that the PuTTY settings in the tree view depend on which saved session is loaded and active. It is very easy to end up comparing the default settings without realizing it.

    One other thing to validate -- at the UNIX command line, prior to starting progress, verify that your terminal type and stty settings are the same for both servers:

    prompt> echo $TERM
    prompt> stty -a
    speed 38400 baud; rows 81; columns 230; line = 0;
    intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
    -parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
    -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon ixoff -iuclc -ixany -imaxbel -iutf8
    opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
    isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke

    Depending on the OS Progress does sometimes vary the session rows and columns based on the "stty" settings ("ws" works for Linux but not on AIX -- offhand I forget if it works on Solaris and HPUX).
  11. Rob Fitzpatrick

    Rob Fitzpatrick ProgressTalk.com Sponsor

    There isn't a profile "copy" function per se, but there are a couple of ways to do this. One is to use Load on one profile, then Save with a different name (and other changed settings). The other is to use the registry. Each profile's settings are stored in a reg key. So you can export a profile as a .reg file, edit it, and then load the modified file into the registry.

    This is also a useful way to compare two profiles, by exporting them to .reg and then diffing the files.
  12. darrellwoodard

    darrellwoodard New Member

    Use Load on one profile, then Save with a different name - that is the way I did it!
  13. tamhas

    tamhas ProgressTalk.com Sponsor

    The other possibility would be that the protermcaps are different.
  14. darrellwoodard

    darrellwoodard New Member

    protermcaps were exactly the same.
    I finally got it working.
    But I am not sure what the full solution was.
    There were two things I did to fix it.

    The first was add ‘export TERM=vt400’ to my .profile. Not sure why I had to do this because if I did the ‘echo $TERM’ it showed vt400 before I added it to my .profile.

    The second thing was related to the customized way we go into the editor.
    We type the command ‘mrun’ and it brings up a menu of databases to connect to.
    I found out someone had developed another command ‘mymrun’ which does the exact same thing.
    However, if I use mrun I have the sizing issue. If I use mymrun I do not.

    So not sure what is behind the scenes of those 2 commands, therefore, not sure what the solution is.
  15. Rob Fitzpatrick

    Rob Fitzpatrick ProgressTalk.com Sponsor

    It may be that while your login shell set TERM=vt400, the sub-shell invoked by the mrun script, and therefore the editor session it launched, did not.

Share This Page