Rocket Software Homepage
Forum Home Forum Home > AccuTerm Knowledge Base (read only) > Code Samples
  New Posts New Posts RSS Feed - Set DBMS Term Type to agree with AccuTerm
  FAQ FAQ  Forum Search   Register Register  Login Login

The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum.

Forum LockedSet DBMS Term Type to agree with AccuTerm

 Post Reply Post Reply
Author
Message
TonyG View Drop Down
Beta Tester
Beta Tester


Joined: February 04 2004
Location: United States
Status: Offline
Points: 127
Post Options Post Options   Thanks (0) Thanks(0)   Quote TonyG Quote  Post ReplyReply Direct Link To This Post Topic: Set DBMS Term Type to agree with AccuTerm
    Posted: May 29 2013 at 12:55pm
I wrote a script for changing various session settings but I found it wasn't working right unless the DBMS term type agreed with the AccuTerm.TermType. How do you know which term type to use? That's what this code does for you.

Please respond with better suggestions for term types based on the D3 Devices file, with new Devices items corresponding to AccuTerm types, or with enhancements to support databases other than D3.

Current assumptions:
1) Where the DBMS does not support the AccuTerm term type, the DBMS is set to an older device for the same type. For example, where VT420 isn't supported, VT320 is assigned.
2) I don't believe D3 has any Devices items which are compatible with OS-level types for SCO or Linux. If this is incorrect, please correct the error - or provide a new Devices item.

*

* BASIC program can be run on entry into MV user or account,
* Sets the DBMS term type to whatever the user has set in AccuTerm.
* Of course the exact opposite is possible: Set the term type and then
* set the AccuTerm session to the proper corresponding value. But that's
* another script.
*
* Written: Tony Gravagno, Nebula Research and Development
* 2013-May-29

       
       ESC = CHAR(27); STX = CHAR(2); CR = CHAR(13); EM = CHAR(25)
       ECHO OFF
       PROMPT ""
       
       SCRIPT = \\
       SCRIPT := EM : \ ActiveSession.Output ActiveSession.TermType & vbCrlf\
       CMD = ESC:STX:'P':SCRIPT:CR
       CRT CMD:
       INPUT AT.T; * Accuterm Term Type Code
       * CRT ">>>":AT.T:"<<<"
       
       DB.T = ""; * Database Term Type
       DB = "D3"
       
       IF DB = "D3" THEN
          IF AT.T = 0 THEN DB.T = "DUMB,"; * atTermTTY
          IF AT.T = 1 THEN DB.T = "VP-A2,"; * atTermVPA2
          IF AT.T = 2 THEN DB.T = "VP-60,"; * atTermVP60
          IF AT.T = 3 THEN DB.T = "VP-60,"; * atTermP60
          IF AT.T = 4 THEN DB.T = "VP-A2,"; * atTermA2E
          IF AT.T = 5 THEN DB.T = "WY-50,"; * atTermWY50
          IF AT.T = 6 THEN DB.T = "WY-60,"; * atTermWY60
          IF AT.T = 7 THEN DB.T = "VT-52,"; * atTermVT52
          IF AT.T = 8 THEN DB.T = "VT100,"; * atTermVT220
          IF AT.T = 9 THEN DB.T = "DUMB,"; * atTermANSI
          IF AT.T = 10 THEN DB.T = "MM-MON,"; * atTermPICKMON
          IF AT.T = 11 THEN DB.T = "TEC,"; * atTermTEK
          IF AT.T = 12 THEN DB.T = "VT100,"; * atTermVT100
          IF AT.T = 13 THEN DB.T = "VT320,"; * atTermVT320
          IF AT.T = 14 THEN DB.T = "VT320,"; * atTermVT420
          IF AT.T = 15 THEN DB.T = "VT100,"; * atTermSCO
          IF AT.T = 16 THEN DB.T = "VT100,"; * atTermLinux
          IF AT.T = 17 THEN DB.T = "TEC,"; * atTermTEK4100
          IF AT.T = 18 THEN DB.T = "prism,"; * atTermP30
       END
       * add settings for another DBMS here
       * IF DB = "FOO" THEN ...       
       
       * Change the columns and rows to suit your app
       EXECUTE "TERM ":DB.T:"180,40" CAPTURING OUT
       ECHO ON


For reference, here are the codes for the session.TermType as described in the AccuTerm documentation:

atTermTTY: basic TTY
atTermVPA2: ADDS Viewpoint A2
atTermVP60: ADDS Viewpoint 60
atTermP60: ProComm Viewpoint 60
atTermA2E: ADDS Viewpoint A2 Enhanced
atTermWY50: Wyse 50
atTermWY60: Wyse 60
atTermVT52: DEC VT-52
atTermVT100: DEC VT-100
atTermVT220: DEC VT-220
atTermVT320: DEC VT-320
atTermVT420: DEC VT-420
atTermLinux: Linux console
atTermSCO: SCO console
atTermANSI: ANSI BBS
atTermPICKMON: Pick PC Monitor
atTermP30: MDIS P30
atTermTEK: Tektronix 4014
atTermTEK4100: Tektronix 4100
Tony Gravagno Nebula Research & Development
TG@ Nebula-RnD . com
http://Nebula-RnD.com/blog
http://Twitter.com/TonyGravagno
http://groups.google.com/group/mvdbms
https://www.linkedin.com/groups/64935
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.