                     *************************************
                     *  Mocha ActiveX TN5250 version 2.4 *
                     *     Copyright (C) MochaSoft       *
                     *       All Rights Reserved         *
                     *************************************
 
This is the README.TXT  file for Mocha ActiveX TN5250

Mocha ActiveX TN5250 is a Windows 98/2000/NT application. It makes it 
possible to connect to an IBM host via TCP/IP with the TN5250 protocol
and emulate a 5250 Information Display System

Mocha ActiveX TN5250 should be installed on a web server and downloaded
to a workstation running Internet Explorer 4.0 or better.
Some combinations of old IE 4.0 and Windows DLL files can give problems.
We must recommend the latest version of IE from Microsoft.
Mocha ActiveX TN5250 cannot run on in a Netscape Browser environment.

It is a cost effective solution, as it is not necessary to
install anything on the workstations. Compared to a Java applet solution
this product offer a better user interface, but it is restricted to only 
run on Windows workstations.


*** Order ***
    
    Visit www.mochasoft.dk for latest information. You can order with
    Credit card or bank transfer.

    Site License       :  350 USD

    With a Site license this program can run (be download to) on any number
    of workstations as long as the AS/400 host(s), and the Web Server from
    where Mocha ActiveX TN5250 is downloaded from, are part of a single
    company. A workstation does not have to be part of the given company.

    Check also files license.txt and register.txt

*** Limitations ***

    - Only support for Internet Explorer 4.0 or better. No support
      for the Netscape browser.
      Some combinations of old IE 4.0 and Windows DLL files can give 
      problems. We must recommend the latest version of IE from Microsoft.
      It is possible to use IE 3.0 , but we cannot give support for this 
      platform version.
    - The program is not designed to be used as a component in a non
      Internet Explorer environment. 

*** Installation ***

    - unpack files with a zip utility, into a directory on the 
      web server. It is not a requirement the web server should
      be an AS/400. 
    - From a workstation select the TN5250.HTM page 
      Notice the TN5250.HTM page include a version number after
      the MATN5250.CAB statement. If a new version of Mocha ActiveX
      TN5250 has to be installed this version number must be changed, 
      to force Internet Explorer to download a new copy of the program 
      to the hard disk.

*** How to remove Mocha Active TN5250 from Internet Explorer

    - In IE select menu - Tools - Internet Options - General -
      "Temporary Internet Files" Settings - View Objects.
      Select "Matn5250 Control" and use toolbar option "Delete"
      or menu - file - delete.

*** Documentation ***

    The documentation has been included in the Window Help
    system. Select Help in the menu.

*** Parameters to the ActiveX program in the HTML file ****

    See also file TN5250.HTM


 

      localsave   : 1 and the user can save configuration to the local
                    registry on exit. The local registry values will 
                    overrule configuration in WEB page. (**)
                    0 : User cannot save the configuration
      licname     : License name (received when you make an order)
      lickey      : License key
      host_name   : IP name or address for the AS400 host
      port        : TN5250 port address (default is 23) 992 if SSH is used
      ssh         : 0 -> no SSL
                    1 -> SSL protocol is used. Port number should be 992
      ssh128      : 0 -> SSL 56 bit
                    1 -> SSL 128 bit (default)

      devicename  : Session device name. it is possible to use computer name
                    and user name in the device name

                       %U = user name (if spaces in the name, the part after the space is ignored)
                       %C = computer name
 
                    Example:
    
                       A%C%U and computer name is XP and user "Joe John"

                       gives device name AXPJOE
   
  
      autoconnect : 1 -> Make a session to the AS/400 host when the 
                    program is started
      security_connect :
                    Only the AS/400 host given in the parameter 
                    host_name can be used
      auto_login  : 0 -> not used
                    1 -> use parameter auto_user and auto_password
      auto_user   : user name
      auto_password:
                    password on the AS/400. Notice there is not much
                    security using this option!
      termtype    : Terminal type 
                      0 = IBM-3477_FC (27*132 color display)
                      1 = IBM-3179-2  (24*802 color display)
      keys        : Keyboard mapping file (see below (****) for syntax) 
      ebcdic      : EBCDIC mapping file:  (see below (***) for syntax)
                    ebc_us.txt  : EBCDIC <-> ASCII table US 
                    ebc_ita.txt : EBCDIC <-> ASCII table Italy 
                    ebc_ger.txt : EBCDIC <-> ASCII table Austria/Germany 
                    ebc_spa.txt : EBCDIC <-> ASCII table Spain 
                    ebc_fr.txt  : EBCDIC <-> ASCII table French 
                    ebc_uk.txt  : EBCDIC <-> ASCII table United Kingdom 
                    ebc_rus.txt : EBCDIC <-> ASCII table Russian 
                    ebc_fin.txt : EBCDIC <-> ASCII table Finland/Sweden 
                    ebc_ice.txt : EBCDIC <-> ASCII table Iceland 
                    ebc_dk.txt  : EBCDIC <-> ASCII table Danish/Norway 
                    ebc_cz.txt  : EBCDIC <-> ASCII table Czech 
                    ebc_grk.txt : EBCDIC <-> ASCII table Greek 
 
      color_bg    : Background color (*)
      color_cursor: color cursor(*)
      color_select: clipboard area (*)
      color_red   : color red (*)
      color_blue  : color blue (*)
      color_pink  : color pink (*)
      color_green : color green (*)
      color_turquoise:  color turquoise (*)
      color_yellow: color yellow (*)
      color_white : color white (*)
      font_weight : 0 -> normal
                    700 -> bold
      font_italic : 0 -> normal
                    1 -> Italic
      fontsize    : Font size
      font_name   : Name of the text font
      pfontsize   : Printer font size
      pfont_weight: 0 -> normal (printer)
                    700 -> bold
      pfont_italic: 0 -> normal (printer)
                    1 -> Italic
      pfont_name  : Printer font name
      use_cv      : 1 -> enable ctrl c and ctrl v as copy/paste
      
      proxy_host  : IP address for the proxy server
      proxy_enable: 1 -> use proxy protocol
      proxy_port  : Proxy port
      proxy_syntax: Proxy syntax
      proxy_socks_enable:
                    1 -> enable SOCKS protocol
      proxy_return: Sequence RETURN key send when in session with proxy server
                    Is only used if proxy_socks_enable = 0. 
      
      blink_cursor: 1 -> Cursor blink
      cursortype  : 0 -> Full cursor
                    1 -> Half cursor
                    2 -> Underscore cursor
      cross_cursor: 1 -> Cross hair cursor 
      typeahead   : 1 -> type ahead enabled
      negotiate_display:
                    1 -> debug information for the Telnet protocol is displayed
      tablepaste  : 1 -> When a newline is reached in a paste operation, 
                         Mocha TN5250 will default continue to copy data 
                         to the next field. If <Tablepaste> option is enabled,
                         the program will continue to insert data on the next 
                         line, at the same column location where the paste 
                         was started.
      bell         : 1 -> Makes a beep if illegal input or if the AS/400
                     application ask TN5250 to use the bell.
      hotspots     : 1 -> TN5250 will display function keys on the screen
                     and the user can activate these with the mouse.
      swap_del     : 1 -> The Numlock Del key swaps between . and ,
      message_bell : 1 -> If the AS/400 activates the message bell, tn5250 
                     will beep.
      charset      : 0   = ANSI (default)
                     161 = Greek
                     162 = Turkish
                     238 = EastEurope
                     204 = Russian
      pcharset     : printer character set. See charset for values


      If a single AS/400 should be used and it has IP address MYAS400,
      a reasonable parameter setting could be:

       localsave = 1  (or 0 if you wants to prevent the user from  
                       saving any configuration on the Workstation)
       host_name = MYAS400
       port = 23
       autoconnect = 1
       security_connect = 1

  (*) a color value is written as a decimal number. Example: To use
      RGB value 210,55,17 translate these to hex values 
      0xd2,37,11 or 0xd23711. In decimal this value is 13776657.
      (MS Windows includes a calculator, which can use hex values)

 
  (**)

  Notice if localsave is 1, the user can in menu - "Save configuration"
  save the configuration in the local users registry:

    HKEY_CURRENT_USER\Software\MochaSoft\MATN5250




  (***) EBCDIC MAPPING FILE SYNTAX:

  An AS/400 uses an EBCDIC codepage. In most cases it should be possible
  to select one of the national mapping files included with this product.
  It is also possible to customize a  mapping file. As our mocha w32 tn5250
  product includes a user friendly interface for working with EBCDIC
  files it could be an idea to use this product for the task. 
  The syntax for the EBCDIC files are the same to the two TN5250 products.

  The syntax of the file is : 

   # This is a comment
   <ebcdic value> <ascii value>


   Example: 


   # part of a file
   40 20
   81 a
   82 b
   83 c
   84 d

   Remark it is possible to write ASCII value either as a 2 digit hex number 
   or an ASCII character. In the example a hex value 0x83 from the Host is 
   translated to ascii character 'c'. 

   If identical ASCII values are defined for more than one ebcdic character,
   the last will be valid, when translating from ASCII to ebcdic. 
   If as an example ebcdic 0x50 should be translated to an ASCII space it is 
   important to put the line 

   0x50 0x20 

   before 
 
   0x40 0x20 

   Otherwise Users input when pressing the space bar will be wrong. A value 
   of 0x40 should be expected. 

   (****) KEYBOARD MAPPING FILE SYNTAX:

   All function keys can be customized in the keyboard mapping file. 
   It is possible to edit the keyboard file with a normal ASCII editor,
   as notepad.exe

   The  syntax of the file is

   # is a comment
   <keyname> <5250 key>
   
   Possible keyname:
   
   
   HOME            HOME key
   END             END key
   PGUP            Page Up key
   PGDN            Page Down key
   ESC             ESC key
   RETURN          RETURN key
   ENTER           Enter key 
   MINUS           Numeric keypad -
   PLUS            Numeric keypad +
   CTRL            Right Ctrl key (only valid if parameter use_cv = 0)
   LCTRL           Left Ctrl key (only valid if parameter use_cv = 0) 
   PAUSE           Pause key
   PRINT           Print key
   SCROLL          Scroll Lock key
   BACKSPACE       <-- key
   DELETE  Del (Delete) key
   f1 - f20        function key f1 - f20
   F1 - F20        function key f1 - f20 + SHIFT
   cf1 - cf20      function key f1 - f20 + CTRL
   CF1 - CF20      function key f1 - f20 + SHIFT + CTRL
   CRETURN         Left CTRL + RETURN KEY
   CENTER          Left CTRL + ENTER KEY
   SRETURN         Shift + RETURN KEY
   SENTER          Shift + ENTER KEY
   TAB             Shift + TAB KEY
   SHIFTTAB                Shift + TAB
   MULTIPLY                * key on the keypad
   DIVIDE          / key on the keypad
                   
   Possible 5250 keys:
                   
                   
   PF1 - PF24      5250 function keys
   INSERT          INSERT key. (is also mapped to PC key Ins)
   ERASEINPUT      Erase all input fields
   CLEAR           Send CLEAR to IBM Host, and delete the screen
   BTAB            Go to previous field
   TAB             Go to next field
   RESET           Open keyboard (can also be called from edit menu)
   ENTER           Send ENTER key to IBM Host
   HELP            Send HELP key to IBM Host
   PGDN            Send Page down (roll up) key to IBM Host
   PGUP            Send Page up (roll down)  key to IBM Host
   FIELD-          Field - key
   FIELD+          Field + key
   REAL+           Normal + key
   COMMA           Normal , key
   PERIOD          Normal . key
   REAL*           Normal * key
   REAL/           Normal / key
   REAL-           Normal - key
   FIELDEXIT       Field exit key
   RECORD          Record Backspace (home)
   DUP             DUP key
   PRINT           Send Print request to the AS/400
   SYSREQ          Sys Req key
   DELETENOMOVE    Delete character at cursor, and keep the cursor position
   LEFTDELETE      Character to the left of the cursor is removed
   LEFTARROW       Move the cursor 1 position to the left
   ATTN            Attention key
   BEGIN           Go to start of a field
   END             Go to last position of a field
   LAST            Position cursor after the last character in a field
   NEWLINE         Go to next line
   HARDCOPY        Copy the screen to the printer
   NEXT            jump to next field
   PREVIOUS        jump to the start of the current field, and if at the
                   start of a field,  to the previous  field
                   
   Example:        
                   
   # TN5250          keymap
   # f1 = f        1 key , F1 = shift F1
   # cf1 =         f1 + ctrl  CF1 = shift f1 + ctrl
   #
   # <pc - key>  <5250 key>
   f1   PF1
   f2   PF2
   f3   PF3
   

 
*** Bugs ***

  If any bugs are observed, or ideas for improvement of the product,
  please to not hesitate to contact support@mochasoft.dk

*** Change list ***

version 1.0 010629

  First version.

version 1.1 010912
 - new thread model. Could prevent some IE crash

version 1.2 011012
 - If using a Microsoft IIS Server (Web server) it is possible
   to configure it not to make IE 5.5/6.x not to cache
   files. It created problems for our EBCDIC and keyboard
   layout files. IE removed these just after download! This
   version copy the files to a non cache area.

version 1.3 011012
 - Changed the directory described in 1.2 to the Temp directory

Version 1.4 020311
 - if "WIndows"\temp directory does not exist, c:\temp will
   be used for temporary files. If c:\temp does not exist, the program
   will try to create  "WIndows"\temp

Version 1.5 020704
 - blinking fields did not always display correct

version 1.6 030311
 - fixed problem with many tn5250 windows in a single IE browser.
 - better check for fields with FER option
 - Limited support for continued entry fields
 - SOH order with size less than 7 can give problems
 - use of STRPCO would give an error message at session termination
 - Signed numeric bypass fields would not be ignored, and the result
   was a wrong position of the cursor.
 - Possible to jump to a light pen field. Previous a screen with only light pen
   fields, would put the cursor at position 1.1
 - User Temp directory is used as storage for temporary files
 - charset and pcharset parameters

version 1.7 031122
 - added parameter "ignore_fer". If 1, tn5250 will ignore a field exit required 
   definition for a field

Version 1.7 040727
 - updated the verisign certificate

Version 1.8 041126
 - solved problem with ALTgr

Version 1.9 4 July 2007
 - If a field is defined on the same Web page as the activex object, and
   in the field the user has selected characters, the shift key will
   not work correct in TN5250.

Version 2.0 , 9 May 2008
 - pressing ctrl + shift could give a crash with some IE browsers
 - added support for %U and %C in the device name. %U is the user
   name, and %C the computer name

Version 2.1 , 23 January 2009
 - added 128 bit SSL 

Version 2.2 , 23 January 2009
 - v 2.1 had a problem with reading parameters from the html page

version 2.3 , 17 April 2009
 - hotspots did not work in 2.2

version 2.4 , 30 June 2009
 - file version number was wrong in 2.3
 - updated verisign certificate

*** List Of Files ***

The Mocha ActiveX TN5250 package consists of the following files.

    README.TXT          Introductory information
    TN5250.HTM          HTML example file
    MATN5250.CAB        ActiveX component in a signed CAB archive
    KEYS.TXT            Function key mapping (ASCII file)
    LICENSE.TXT         license agreement/warranty disclaimer
    EBC_US.TXT          EBCDIC <-> ASCII file US 
    EBC_ITA.TXT         EBCDIC <-> ASCII file Italy 
    EBC_GER.TXT         EBCDIC <-> ASCII file Austria/Germany 
    EBC_SPA.TXT         EBCDIC <-> ASCII file Spain 
    EBC_FR.TXT          EBCDIC <-> ASCII file French 
    EBC_UK.TXT          EBCDIC <-> ASCII file United Kingdom 
    EBC_RUS.TXT         EBCDIC <-> ASCII file Russian 
    EBC_FIN.TXT         EBCDIC <-> ASCII file Finland/Sweden 
    EBC_ICE.TXT         EBCDIC <-> ASCII file Iceland 
    EBC_DK.TXT          EBCDIC <-> ASCII file Danish/Norway 
    EBC_CZ.TXT          EBCDIC <-> ASCII file Czech 
    EBC_GRK.TXT         EBCDIC <-> ASCII file Greek 


    If you did not receive all these files please contact 
    support@mochasoft.dk, or check www.mochasoft.dk
