sun termcap entries for using Informix under SunOS This file is a collection of termcap entries submitted by Informix users and/or grabbed off of the Net. They have been accumulated here without testing or editing, so of course "your mileage may vary." The entries in this file support the following terminals, windows and environments (listed in the order in which they appear in this file): o Xterm terminal emulator (X window system) on SPARCs running Open Windows and generic X11R5 from MIT o vt100 running both Informix and Emacs under SunOS o Sun Microsystems Workstation/console "sun-cmd" o A message about attempting to use color on Sun workstations o Sun Microsystems Workstation console, console without insert character, console with scrollable history Send any termcap or terminfo entries to be added to this collection to walt@mathcs.emory.edu or {...,gatech,rutgers,uunet}!emory!walt. ============================================================================== From: jeffl@isg.com Date: 7 May 92 00:23:13 GMT Here is the xterm window termcap entry we use. It seems to work on SPARCs running both Open Windows and generic X11R5 from MIT. vs|xterm|vs100|xterm terminal emulator (X window system):\ :cr=^M:do=^J:nl=^J:bl=^G:le=^H:ho=\E[H:\ :co#80:li#65:cl=\E[H\E[2J:bs:am:cm=\E[%i%d;%dH:nd=\E[C:up=\E[A:\ :ce=\E[K:cd=\E[J:so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m:\ :md=\E[1m:mr=\E[7m:me=\E[m:\ :ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=^H:\ :k0=\E[11~:k1=\E[12~:k2=\E[13~:k3=\E[14~:k4=\E[15~:\ :k5=\E[17~:k6=\E[18~:k7=\E[19~:k8=\E[20~:k9=\E[21~:\ :kY=\E[216z:kZ=\E[222z:\ :ta=^I:pt:sf=\n:sr=\EM:\ :al=\E[L:dl=\E[M:ic=\E[@:dc=\E[P:\ :MT:ks=\E[?1h\E=:ke=\E[?1l\E>:\ :is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l:\ :rs=\E[r\E<\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l:xn:\ :AL=\E[%dL:DL=\E[%dM:IC=\E[%d@:DC=\E[%dP:\ :ti=\E7\E[?47h\E(B\E)0:te=\E[2J\E[?47l\E8:\ :hs:ts=\E[?E\E[?%i%dT:fs=\E[?F:es:ds=\E[?E:\ :gs=^n:ge=^o:gb=lmkjqx: -- Jeffrey F. Lawhorn American TriTech/ISG Programming Manager C, C++, and Database Consulting jeffl@isg.com 450 B Street 16th Floor sdsu!isg100!jeffl San Diego, CA 92101 (619) 234-3405 x274 ------------------------------------------------------------------------------ From: bochner@das.harvard.edu Date: Fri, 08 May 92 11:33:27 -0400 Some explanation: there are termcap codes 'ks' and 'ke' that mean something like "enter/exit keypad mode". If these are defined in the termcap entry, Informix sends ks, reasonably figuring that they ought to send it to activate the keypad. But the ks code in the SunOS termcap entry for vt100's has the effect of putting the terminal into a mode where the keypad keys send escape sequences rather than numerals, and Informix doesn't understand those escape sequences. So using the SunOS termcap with informix makes the keypad unusable. BUT, the termcap that Informix shipped us doesn't work with Emacs because it's missing the sf code for "scroll up". So I copied the value from SunOS termcap entry, and it seems to work. # this termcap entry is a modified version of the one supplied by # informix: it contains the 'sf' entry, w/o which emacs won't work. # we can't use the SunOS system entry for vt100's because it contains # ks and ke entries that informix misuses. # for all other terminal types, however, we use the std entries, # with no problems so far ... HB 3/91 v1|vt100|vt-100|DEC vt100:\ :bs:am:xn:xv:pt:cd=\E[J:ce=2\E[K:cl=45\E[H\E[J:\ :cs=%i\E[%d;%dr:cm=%i\E[%d;%dH:co#80:li#24:\ :Hi=\E=:Hf=\E>:HI=^|:Po=\E1:Pe=\E2:\ :bc=\E[D:do=\E[B:nd=\E[C:sf=5\ED:sr=5\EM:up=\E[A:so=\E[7m:se=\E[m:\ :ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D:kh=\E[H:us=\E[4m:ue=\E[0m:\ :k0=\EOP:k1=\EOQ:k2=\EOR:k3=\EOS:\ :k5=\EOn:k7=\EOw:k8=\EOx:k9=\EOy:\ :KA=\EOu:KU=\EOM:KB=\EOv:KC=\EOt:\ :Ki=\EOr:KT=\EOl:KY=\EOS:KZ=\EOq:\ :Kd=\EOm:k6=\EOs: \ :sc=\E7:rc=\E8: \ :gs=\E(0:ge=\E(B:gb=lmkjqx: ------------------------------------------------------------------------------ From: jsango@sni232.orl.mmc.com (Jason Sango) Date: Mon, 11 Jan 93 07:50:10 EST <<<<<<<<<<<<<<<<<<<<<<<<<<<<< CUT HERE >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Mu|sun-cmd|Sun Microsystems Workstation console modified for use w Informix:\ :am:bs:km:mi:ms:pt:li#34:co#80:cl=^L:cm=\E[%i%d;%dH:\ :ce=\E[K:cd=\E[J:\ :so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m:rs=\E[s:\ :md=\E[1m:mr=\E[7m:me=\E[m:\ :al=\E[L:dl=\E[M:im=:ei=:ic=\E[@:dc=\E[P:\ :AL=\E[%dL:DL=\E[%dM:IC=\E[%d@:DC=\E[%dP:\ :up=\E[A:nd=\E[C:ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D:\ :k0=\E[224z:k1=\E[225z:k2=\E[226z:k3=\E[227z:k4=\E[228z:\ :k5=\E[229z:k6=\E[230z:k7=\E[231z:k8=\E[232z:k9=\E[233z:\ :kA=\E[234z:kB=\E[235z:\ :kf=\E[222z:kg=\E[216z:\ :te=\E[>4h:ti=\E[>4l:gs=:ge=:gb=******: # This termcap file is a combination of the standard sun termcap entry from # /etc/termcap and the sun-cmd termcap entry from /etc/termcap (te= and ti= # entries represented). This termcap has also been modified to map the # function keys F1 - F12 on a Sun Type 4 keyboard so that the Informix "ON KEY" # command and "OPTIONS" statement will respond when the the product is being # run under Openwindows Version 2.0 and 3.0 in a Command Tool Window # (represented by the k0 - kB (F1 -F12) entries respectively). # Use of the extended Function key designations (kC (F13) - kZ (F36)) in # Informix does not seem to work on a Sun SPARCstation. Informix also provides # for a specific feature in the termcap file to map the NEXT PAGE, PREVIOUS # PAGE, INSERT LINE and DELETE LINE keys in a screen array using the termcap # entries kf=, kg=, ki= and kj=. The use of this feature is limited under # Openwindows to some of the keys which have an escape sequence defined in the # $OPENWINHOME/lib/.ttyswrc file, the author was not able to get the L2-L4 # keys to work properly or many of the R keys either. # In this termcap, kf (NEXT PAGE) and kg (PREVIOUS PAGE) # are assigned to the PgUp and PgDn keys on the keypad. The user wanted to # have INSERT LINE (ki) and DELETE LINE (kj) assigned to the Ins and Del keys # on the keypad but this was not possible using these Informix specific # termcap features. In order to achieve the desired objective, it is necessary # to fool Informix and your keyboard using the following methodology: By # assigning the logical Function Keys F11 and F12 respectively, # you can bind the Ins and Del keys to F11 and F12 using xmodmap. Another # problem arises if you are switching between applications which are not all # written in Informix. The workaround is very straightforward, never run your # Informix applications directly, rather, run shell scripts to launch them and # in this shell script embed the commands to point to this termcap and bind # your F keys. A sample script follows: # # Script to set Informix termcap and bind Ins and Del keys to L3 and L4. # #!/bin/csh -f # setenv TERM sun-cmd # setenv TERMCAP /$PWSHOME/etc/pwstermcap #(Location of this termcap file) # xmodmap -e 'keysym Insert = SunXK_F36' # Binds Keypad Ins Key to F11 # xmodmap -e 'keysym Delete = SunXK_F37' # Binds Keypad Del Key to F12 # xmodmap -e 'keycode 73 = SunXK_F37' # Binds Keyboard Del Key to F12 # cmdtool csh -c "reset;filename.4ge&" # # End of sample script # # It is important to note several things here. To ensure that the environment # which is going to run the Informix application is "clean", be sure to locate # your shell script and executable in different directories. Testing has # also revealed that the use of "reset" is necessary when firing off Informix # applications in background mode (eg filename.4ge&) to keep things straight. # If you wish to bind to other keys, you can get a listing of current key # assignments by doing a xmodmap -pk from the command line (eg the values # for F11 and F12 were found using this method), for any assigments # other than those provided here you are on your own. Your work # is not finished at this point, you still need to include the OPTIONS in # your Informix Application: # # OPTIONS # INSERT KEY F11, # DELETE KEY F12, # . # . # . # # A little bonus results from this action, F11 & Ins both work for INSERT and # F12, keypad Del and keyboard Delete work for DELETE. # Please note that Informix will automatically default to using the keys you # have specified for PREVIOUS and NEXT because they were directly mapped from # the .ttyswrc using the Informix specific termcap entries. # One last caveat in this process, to reset your environment # back to the way it was before you ran the Informix application using the # xmodmap modifications, you need to include code under your program exit # menu that runs to xmodmap statements: # # Sample 4gl reset code # # COMMAND KEY (x) "eXit" "Exit this application" # RUN "xmodmap -e 'keycode 101 = Insert'" # RUN "xmodmap -e 'keycode 57 = Delete'" # RUN "xmodmap -e 'keycode 73 = Delete'" # EXIT PROGRAM (0) # END MENU # END FUNCTION # # The EXIT PROGRAM (0) is used to get a clean exit from a background process, # (eg filename.4ge&). Please note, tha the man pages under xmodmap say you # can run xmodmap filename where filename represents a file that contains the # xmodmap expressions to be executed, I was unable to get my Informix # application to recognize my keyboard remapping using this method thus I used # the straight command line version of xmodmap which works fine. This termcap # also contains entries to change the default graphics border to *'s which is # an Informix specific feature (gs=,ge=, and gb= entries represented). Please # note, in order to have the function keys respond it is also necessary to # disable the F1 key in your ~/ .xinitrc file by commenting out the # xmodmap -e 'keysym F1 = Help' line in the file. This information is # provided as is and without expressed or limited warranty of any kind by # anyone involved in the creation, production, or distribution of this text. # Many thanks to David Cortesi at Informix and the Technical Support Staff # at Sun Microsystems for providing me with the pieces to fit this puzzle # together. # # Created by Jason A. Sango, Martin Marietta Missile Systems, 4 May 1992. # jsango@sni232.orl.mmc.com, Telephone (407) 356-1370 <<<<<<<<<<<<<<<<<<<<<<<<<<<<< CUT HERE >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> -- Jason Sango Martin Marietta Missile Systems Company Email: jsango@sni232.orl.mmc.com Telephone: (407) 356-1370 ------------------------------------------------------------------------------ From: johnl@informix.com (Jonathan Leffler) Date: 25 Aug 1993 14:23:30 -0400 ijesus@ing.ula.ve (Jesus Ruiz (U.L.A-I.S)) writes: >What change i need to do in the file termcap to use continuos frame in the >windows of my aplication in 4gl (informix), it's var. gs=?,ge=?,bg=?. >and if is posible color (var. ZA=??) . we have >workstation sun (console) with sun OS 4.1.1. The same to solaris 2.2. Informix colour handling only works when the terminal responds to control sequences and changes the colour. Sun colour handling only works when you set colour maps and all sorts of other nasties. The two systems are mutually exclusive, so you cannot obtain colour handling even on a colour Sun. Yours, Jonathan Leffler (johnl@informix.com) #include ------------------------------------------------------------------------------ From: inf_bb@hermes1.sps.mot.com (Bob Baskett) Date: 13 Sep 1994 16:23:06 -0400 Mu|sun|Sun Microsystems Workstation console:\ :am:bs:km:mi:ms:pt:li#34:co#80:cl=^L:cm=\E[%i%d;%dH:\ :ce=\E[K:cd=\E[J:so=\E[7m:se=\E[m:rs=\E[s:\ :al=\E[L:dl=\E[M:im=:ei=:ic=\E[@:dc=\E[P:\ :up=\E[A:nd=\E[C:ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D:\ :k1=\E[224z:k2=\E[225z:k3=\E[226z:k4=\E[227z:k5=\E[228z:\ :k6=\E[229z:k7=\E[230z:k8=\E[231z:k9=\E[232z: M-|sun-nic|sune|Sun Microsystems Workstation console without insert character:\ :ic@:im@:ei@:tc=sun: M+|sun-cmd|Sun Microsystems Workstation console with scrollable history:\ :te=\E[>4h:ti=\E[>4l:tc=sun: -- regards, +----------------------------------------------------------------------------+ | . . | Bob Baskett | | ... ... | Software Engineer | | ..... ..... | Business Systems Integration Group | | .. ... .. | Semiconductor Products Sector | | . . . | Mesa, AZ | | | President, Informix Users Group Of Arizona | | Motorola, Inc. | | +----------------------------------------------------------------------------+ | Sun 690MP 4.1.3, Online 5.01, 4.10.UD1 Tools, Fourgen v4.10.UC1 | +----------------------------------------------------------------------------+ ==============================================================================