From: MERC::"uunet!WKUVX1.BITNET!MacroMan" 28-FEB-1993 07:59:43.07 To: MACRO32@WKUVX1.BITNET CC: Subj: Re: SMG Termtable user def's. (internals) In article <01GV6GT585HE9BVFC9@MONMOUTH-etdl1.Army.MIL>, SCHENKENBERG@Monmouth-ETDL1.Army.MIL (Brian J. Schenkenberger, VAXman) writes: > A client using SMG for terminal I/O has decided to add color to the > application. I have created two custom SMG termtable entries for a > Wyse370 (pseudo-VTxxx + mfg. specific color esc. seq.) and a PC with > an ANSI terminal emulation (ie. ProCOMM, CrossTalk) and IBM defined > graphics codes. > > The terminals may now be specified (once TERM$TABLOC is defined) with > $ SET TERMINAL/DEVICE=Wyse370 - or - $ SET TERMINAL/DEVICE=ANSI_PC. > > GETDVI/DVI$_DEVTYPE now returns numeric type codes for the Wyse370 and > ANSI_PC as 189 and 188, respectively. Doing some investigation, the > numeric assignment (order of) appears to be defined by the order in > which each new terminal type was defined in the TERMTABLE.TXT source > file. However, the values 188 and 189 are always used for these new > terminal def's. > > Question: Does anyone know if these values will be retained from version > to version? Will these #'s be retained if more terminals are defined? Yes "anybody" does: the answer is NO! In addition to noticing that the device number returned by F$GETDVI depends on the order you've entered the new terminal definitions in your SMGTERMS.TXT (or separate site-specific file), note that the _value_ also depends on whether you've incorporated your definitions into SYS$SYSTEM:TERMTABLE.EXE (via TERMTABLE.TXT, etc.) or whether you've created an additional "termtable".EXE which you point to via TERM$TABLOC. Having worried about this (a lot!) for our site, which comprises a half a dozen independently managed VAXclusters, and wanting _consistent_ DEVTYPE's across clusters (so that, e.g., SET HOST gets the correct terminal type on the remote end), I STRONGLY suggest putting your additions in a SEPARATE "termtable".EXE, and use TERM$TABLOC to point to it. Put ONLY your additions in it (don't override DEC's terminal definitions in SYS$SYSTEM by adding them to yours: the system will look at your _short_ list first, then at SYS$SYSTEM:TERMTABLE.EXE if it can't find what it's looking for). If you do this, you won't need to rebuild your site-specific termtable after every VMS upgrade (to get DEC's new terminal definitions), _and_ the DEVTYPE numbers for your terminals won't change. > I'm trying to find out IF these values can be used reliably from a DCL > procedure using F$getdvi("TT","DEVTYPE"). I'd like to avoid a hack of > calling SMG$INIT_TERM_TABLE_BY_TYPE and passing the terminal description > back to a DCL symbol. It takes approximately two (executable) lines of Fortran to use SMG$INIT_TERM_TABLE_BY_TYPE; I use a 14-line (including comments and blanks lines) Fortran program to retrieve the terminal device name string and set a symbol for further use in DCL. I consider this safer than depending, e.g., on 188 and 189 because those values could change if you add more definitions to your termtable, or move things around in the file, but the device name string won't. In other words, I don't think this solution should be sneered at as a "hack"... :-) > While I'm at it... I'd like to hear from anyone that has defined SMG > terminal tables other than the aforementioned. You just did ;-) -Ken -- Dr. Kenneth H. Fairfield | Internet: Fairfield@Slac.Stanford.Edu SLAC, P.O.Box 4349, MS 98 | DECnet: 45537::FAIRFIELD (45537=SLACVX) Stanford, CA 94309 | BITNET Fairfield@Slacvx ---------------------------------------------------------------------------- These opinions are mine, not SLAC's, Stanford's, nor the DOE's...