Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!ucbvax!CC3.CC.UMR.EDU!obrennan From: obrennan@CC3.CC.UMR.EDU (obrennan) Newsgroups: comp.sys.apollo Subject: TN3270 Message-ID: <9010182127.AA00192@cc2.cc.umr.edu> Date: 18 Oct 90 21:27:55 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 178 Since I have received many requests for the TN3270 details I decided to post it to the net. Here goes: --------------------------------------------------------------------- The source came from uunet.uu.net and was under anonymous FTP as networking/tn3270.4.1.1.tar.z. To build the tn3270 module here are most, if not all, of the changes needed: NOTE: I only have this working at SR10.2 1) you need to uncompress the file, then tar extract it (which will restore a disttn3270 directory and subdirectories in the current directory. 2) change directory to disttn3270/tn3270 and change the files "makefile" and "tools/makefile" to include "-Dsun" option on the "DEFINES = " statement. 3) in the "telnet/Makefile" file delete the "trap.h" entry and change "/lib/libc.a" to "/lib/libc". 4) in the "disttn370/tn3270" directory issue "make makefile" to build the "tn3270" executable module in that directory. Under X-windows, tn3270 works pretty slick. I tend to use xterm options "-geometry 80xrows+xpos+ypos" for window size and "-fn fg-18 -fb fg-18" for font definitions. Changing the font will also change the size of the window opened by xterm. Row sizes recognized by the IBM are (I believe) 24, 32, and 43. So, using a combination of row size and font size you should be able to build a window to your liking. Be sure and choose a fixed size font (not proportional by character), otherwise the screen could look scrambled at times. Also, using Apollo_15_color, if the window is a bit larger than needed, you may get lines that wrap or look funny. Also, if the window is not big enough, you will end up in line-mode. Choosing 80 characters for columns under X-windows solves both problems. Here is the /etc/map3270 file I have built so far (NOTE: not all of the DM keys are mapped). ----------------------------------------------------------------------- # # Copyright (c) 1987 Regents of the University of California. # All rights reserved. The Berkeley software License Agreement # specifies the terms and conditions for redistribution. # # @(#)map3270 1.1 (Berkeley) 11/20/87 # # # /etc/map3270 (/usr/new/etc/map3270 before migration) # mail corrections and additions to "termcap" # # this file contains mappings between characters entered from the keyboard, # and 3270 keys, for use by programs (like tn3270) doing 3270 emulation # from unix. # # inside the single quotes, a caret ("^") introduces a control character # sequence (rub out = ^?, by the way). also inside the single quotes, # a backslash ('\') introduces an escaped character. Also, \n, \r, \t, # are all as in c, and \E is another way of representing escape. # # NOTE that while we are defining lots of function, much of that # function (ie: local editing keys) may not yet be available from # tn3270. apollo_15_color | vt132 { enter = '^m'; clear = '^c'; tab = '^i'; btab = '^b'; left = '^h' | '\EOD'; right = '^l' | '\EOC'; up = '^k' | '\EOA'; down = '^j' | '\EOB'; home = '\EOn'; delete = '^?'; eeof = '^e'; einp = '^w' | '\E[M'; insrt = '\E ' | '\E[4h'; # pf keys pfk1 = '\E1'; pfk2 = '\EOP' | '\E2'; pfk3 = '\EOQ' | '\E3'; pfk4 = '\EOR' | '\E4'; pfk5 = '\EOS' | '\E5'; pfk6 = '\EOq' | '\E6'; pfk7 = '\EOr' | '\E7'; pfk8 = '\E8'; pfk9 = '\E9'; pfk10 = '\E0'; pfk11 = '\E!'; pfk12 = '\EOw' | '\E@'; pfk13 = '\EOx' | '\E#'; pfk14 = '\EOy' | '\E$'; pfk15 = '\EOm' | '\E%'; pfk16 = '\EOs' | '\E\^';pfk17 = '\EOM' | '\E&'; pfk18 = '\E*'; pfk19 = '\E('; pfk20 = '\E)'; pfk21 = '^pf21'; pfk22 = '^pf22'; pfk23 = '^pf23'; pfk24 = '^pf24'; # program attention keys pa1 = '^p1' | '\E-'; pa2 = '^p2' | '\E='; pa3 = '^p3'; # local control keys escape = '^]'; # escape to telnet command mode master_reset = '^g'; # local editing keys settab = '\E;'; deltab = '\E\''; clrtab = '\E:'; setmrg = '\E,'; sethom = '\E.'; coltab = '\E\E[B'; colbak = '\E\E[A'; indent = '\E\E[C'; undent = '\E\E[D'; } xterm { enter = '^m'; clear = '^c'; tab = '^i'; btab = '^b'; left = '^h' | '\EOD'; right = '^l' | '\EOC'; up = '^k' | '\EOA'; down = '^j' | '\EOB'; home = '\EOn'; delete = '^?'; eeof = '^e'; einp = '^w' | '\E[M'; insrt = '\E ' | '\E[4h'; # pf keys pfk1 = '\E[11~' | '\E1'; pfk2 = '\E[12~' | '\E2'; pfk3 = '\E[13~' | '\E3'; pfk4 = '\E[14~' | '\E4'; pfk5 = '\E[15~' | '\E5'; pfk6 = '\E[17~' | '\E6'; pfk7 = '\E[18~' | '\E7'; pfk8 = '\E[19~' | '\E8'; pfk9 = '\E[20~' | '\E9'; pfk10 = '\E0'; pfk11 = '\E!'; pfk12 = '\E@'; pfk13 = '\E#'; pfk14 = '\E$'; pfk15 = '\E%'; pfk16 = '\E\^';pfk17 = '\E&'; pfk18 = '\E*'; pfk19 = '\E('; pfk20 = '\E)'; pfk21 = '^pf21'; pfk22 = '^pf22'; pfk23 = '^pf23'; pfk24 = '^pf24'; # program attention keys pa1 = '^p1' | '\E-'; pa2 = '^p2' | '\E='; pa3 = '^p3'; # local control keys escape = '^]'; # escape to telnet command mode master_reset = '^g'; # local editing keys settab = '\E;'; deltab = '\E\''; clrtab = '\E:'; setmrg = '\E,'; sethom = '\E.'; coltab = '\E\E[B'; colbak = '\E\E[A'; indent = '\E\E[C'; undent = '\E\E[D'; } ----------------------------------------------------------------------- Hope this helps... Gerry O'Brennan Programmer/Analyst Computing Services University of Missouri - Rolla ------------------------------ obrennan@apollo.cc.umr.edu c0022@umrvmb.umr.edu ------------------------------