On Thursday, April 11, 1996 at 4:31:56 pm DST, Jeff Kell <[log in to unmask]> wrote: >On Wed, 10 Apr 1996 16:09:19 -0400 Eddy BELIVEAU said: >>>I need to have a procedure/program that can be included in the sytem >>>logon UDC procedure and which set a JCW with a value like 70092, 70094 >>>or 70096 >>Thanks to : >>John Spivey [log in to unmask] >>[log in to unmask] >>Jeff Kell [log in to unmask] > >Well, that one I knew. Now, for bonus points, does anyone know how to >sense a VT100/VT220/etc terminal under the same conditions? > >Jeff Kell <[log in to unmask]> > We allow users to specify their terminal as HPJOBNAME, like HELLO HP70096,user.account If this is not specified we try to make the terminal echo its type. If this fails we know it's not an HP-terminal so we think it's ANSI/VT. We also check if reflection is used if it's not a terminal. her is a part of our system UDC: logon option logon,nobreak endif if hpjobtype = "S" and hpuser comment ---------------------------------------------------------- comment Only if we are dealing with a terminal session comment ----------------------------------------------------------- setvar hpmsgfence 2 deletevar term deletevar refl setvar refvers "NONE" if hpjobname <> "" then if str(hpjobname,1,2) = "HP" then setvar term str(hpjobname,3,5) else setvar term HPJOBNAME endif setvar refl "OFF" else comment ---------------------------------------------------------- comment Send an escape sequence to the terminal, that will make the comment terminal echo its model number if it is an HP terminal. comment Reflection will return a string which enables you to deter- comment mine, which version is running. The echo is captured in comment the variable 'term'. comment ----------------------------------------------------------- input term, "ESC*s12347^" ;wait=1 if lft(term,1) = "I" then comment ---------------------------------------------- comment A reflection user for DOS comment Save the refelction version in a variable comment ---------------------------------------------- setvar refvers "DOS" endif if lft(term,1) = "W" or lft(term,1) = "I" then if lft(term,1) = "I" then comment ----------------------------------------- comment A reflection user for DOS comment Save the refelction version in a variable comment ------------------------------------------ setvar refvers "DOS" else comment ---------------------------------- comment A reflection user for Windows comment Save the refelction version in a variable comment ----------------------------------------- setvar refvers "WIN" endif comment ---------------------------------------- comment A reflection user comment Send an escape sequence to Reflection, that will make comment Reflection return the terminal model number it is comment emulating if it is emulating an HP-terminal comment -------------------------------------------------- setvar refl "!term" input term, "ESC*s^" ;wait=1 else comment ----------------------------- comment Not a reflection user comment --------------------------- setvar refl "OFF" endif setvar hpmsgfence 0 endif if term = "70092" or term = "70096" then comment ----------------------------------------- comment The HP terminals can save the active user function comment keys in the terminals memory. An escape sequence is comment echoed to store the active function keys. comment ----------------------------------------------- ECHO that escape sequence else if term <> "2392A" comment ------------------------------------------- comment A NON-HP terminal, assume it is an ANSI terminal (VT) comment ---------------------------------------------- setvar term "ANSI" endif endif if term = "ANSI" then comment ---------------------------------------------------- comment do things different comment for ANSI terminals in stead of HP terminals. comment ---------------------------------------------------- if refvers = "NONE" comment -------------------------------------------------- comment If an ANSI terminal and not a ANSI emulating REFLE comment CTION comment -------------------------------------------------- endif comment ---------------------------------------------------- comment If an ANSI terminal or ANSI emulator comment ---------------------------------------------------- endif if refvers = "DOS" then comment ---------------------------