Copyright: Copyright (c) MochaSoft


 Mocha W32 TN5250 Help Index

How To ...

5250 keyboard mapping

Change keyboard mapping

Change ASCII-EBCDIC mapping

Device name support

Use Left Ctrl key as Reset or copy/paste

Press PF18 key with the default keyboard mapping

Parameters to Mocha W32 TN5250

Distinguish multiple sessions as minimized Icons

Use different configurations

Customize the Installation

Check for latest version

Order Mocha W32 TN5250

Commands

File menu

Edit menu

View menu

Settings

Help menu

Troubleshooting

Technical Support

Make a logfile

TN_TIMING_MARK	Change Window size

RESET key does not work	Wrong type of license key


File menu commands

The File menu offers the following commands:

New window	Start a copy of the tn5250 program.
Connect	Connect to Host.
Disconnect	Close a connection to a Host.
Print Screen	Print current screen.
Print Setup	Selects a printer and printer connection.
Sending	Send the active screen through electronic mail.
Exit	Exits Mocha W32 TN5250.


Edit menu commands

The Edit menu offers the following commands:

	Select the full screen
Copy	Copies data from the screen to the clipboard.
Paste	Pastes data from the clipboard into the screen at cursor position.
	Append selected data to the clipboard
Table Format	Paste data from the clipboard in table format.
Reset Terminal	Opens the keyboard. Used to abort a X-WAIT situation.
Ctrl key as double key	Selects if keys CTRL C  V and P should be enabled.
Always Paste in Excel format	If selected the Paste function will first try to read clipboard data in the CSV format, which is good for tables, but not very useful at normal text. Also notice the right click mouse menu has an Excel  paste option.


View menu commands

The View menu offers the following commands:

Toolbar	Shows or hides the toolbar.
Status Bar	Shows or hides the status bar.
Ignore boarders	When calculating the largest font, this option will ignore the space of the boarder. On some old screens this can be useful, as only a few pixels more space will allow a larger font.
Always on top	Select if TN5250 should stay in front of all other windows on the desktop.


Settings menu commands

The Settings menu is used to define the configuration of Mocha TN5250. At Exit from Mocha TN5250 the configuration is saved automatically.

Font	Select font type and size to use in the display.
Colors	Define colors in the display.
Toolbar	Define the layout of the toolbar buttons
Proxy Configuration	It is possible to connect via a proxy server. This menu is used to configure the proxy communication.
Auto Login	Automatic login sequence to the AS/400.
Reset Configuration	Reset all parameters to installation defaults.
License	Add license key, to make Your Mocha W32 TN5250 legal.
Mapping Files	Define Keyboard and data mapping files.
Printer	Select font and margins for printer.
TypeAhead	Select if it should be possible to enter data without waiting for the host to send a response
Termtype	Type of 5250 Terminal.
Log Traffic	Select if all data traffic should be traced.
Keyboard Layout	Change the keyboard layout
EBCDIC Translation Layout	Change the EBCDIC-ASCII translation table.
Bell	An environment friendly option, making it possible to toggle the Warning Bell off.
Cursor	Select cursor type.
Mouse Double Click	A double click on left mouse key will act as an ENTER
Message Sound	The TN5250 protocol includes a Message Sound option
Record	Record keystrokes to a file, for later re-play


Help menu commands

The Help menu offers the following commands, which provide you assistance with this application:

Help Topics	Offers you an index to topics on which you can get help.
Keyboard Mapping	Shows the current keyboard mapping in a window.
About	Displays the version and license information of Mocha TN5250.


Connect
Connect command (File menu)

Use this command to create a new connection to a Host.

  AS/400 Host:  Name of the host. Either an TCP/IP address as 155.22.11.2 or a symbolic name.

It is possible to include the port number with the name. If the AS/400 host has symbolic name as400,  and uses port 911, write as host as400:911

Clear host list, is used to clean up the list of AS/400 hosts.

Advanced:

  Port :  Most TN5250 applications uses port 23.

  Make a connection to the AS/400 at program start :

   If this checkbox is enabled, Mocha TN5250 will make a Login without user action, when it is started (Only if no host parameter is given as parameter to MTN5250.exe)

Auto Reconnect:

     If the session with the AS/400 is terminated, a new session will be created without any User action.

Exit on session termination:

    If the  AS/400 terminates the session, Mocha W32 TN5250 will close without any notification.

Confirm exit:

    If mocha w32 tn5250 is terminated (maybe with ALT F4), and a session is active, an exit

    confirm box will be shown.

Enable SSL (secure socket layer)

   Makes it possible to decode/decrypt data traffic between the AS/400 and the TN5250 Client.

   It is possible to select the encrypt mode to be 56 or 128 bits.

When running in secure mode ONLINE-SSL will be displayed in the status line.


Disconnect
Disconnect command (File menu)

Use this command to disconnect from a Host.


File Exit command
Exit command (File menu)

Use this command to end your Mocha W32 TN5250 session.  You can also use the Close command on the application Control menu.


Sending  command
Sending command (File menu)

Use this command to send a copy of the screen as an electronic mail.


trace option
Log Traffic (Settings menu)

Use this command to define a log file, and toggle trace on/off. This option should only be used in error situations, as the log file uses space on the disk.

The procedure for making a log file:

1) start Mocha W32 TN5250

2) in menu settings, select Log Traffic, and put a [x] in the box. Now all

   data traffic to/from the host is copied to the file given in the window.

3) Run the AS/400 program and see the error

4) Exit Mocha W32 TN5250. Use menu - file - exit

5) send the log file as an e-mail to support@mochasoft.net, and we will

    analyze  the problem. Please remark all passwords will be saved in the log file,

    so change your password after the trace

Show Negotiation:

Use this option to select if the Telnet negotiation should be displayed. Default is off.


termtype
Term Type (Settings menu)

Use this command to define the type of 5250 Information System terminal to emulate.

•	IBM 3477-FC : 27 * 132 Color display

•	IBM 3179-2 : 24 * 80 Color Display

Device name:

If the AS/400 (from V4R1) supports device name (RFC 1205 Feb 1998) transfer, it is possible to request a Telnet terminal session using a specific device name.

It is possible to include %C and %U in the device name. %C will be expanded to the users name and %C to the computers name. If there is a space in one of these names, only the name

before the space will be used. If the user name is Joe Jones, the %C will be substituted with Joe.

Display (LTTI) last transaction time indicator in the status line

If looking for performance problems, this option can be used to enable a timer display

in the status line at the X-WAIT message. It will measure the time from the User press a function key, until the AS/400 send a response. The format is:

  : ss.s , when the transaction time is less than 1 minute

  mm:ss, when the transaction time is 1 minute or more.

Enable New Window option in menu file

Select if it should be possible to start a new tn5250 window. Notice the new session will be started without a device name.


password
Auto Login (Settings menu)

Use this command to define an user id and a password for the Sign On screen on the AS/400.

 Please notice there is not much security involved doing it! It could be an idea to contact the system administrator to verify it is your company politic to have open access to the system without any password security.


typeahead
TypeAhead (Settings menu)

Use this command to define if it should be legal to enter data for the next screen, without waiting for the host to send a response.


copy
Copy command (Edit menu)

Use this command to copy selected data onto the clipboard.  This command is unavailable if there is no data currently selected. Data is selected with pressing the left mouse key and moving the mouse over the area to select.

Also key CTRL+C can be used for this operation.

If shift arrow as select option is used in menu - settings - keyboard layout, it is possible to use

shift arrow to select data on the screen.

Copying data to the clipboard replaces the contents previously stored there.


copy
Ctrl key as double key (Edit menu)

Use this command to define if the standard Windows keys for copy and paste should be enabled. As default left ctrl key is used as RESET key, and it is only possible to copy/paste data with the icons in the toolbar.

If you wants to use CTRL C and CTRL V as copy/paste, it is possible to use ESC as the RESET key.


paste
Paste command (Edit menu)

Use this command to insert a copy of the clipboard contents at the cursor.  This command is unavailable if the clipboard is empty. Also the right mouse key or CTRL V can be used to paste data.


table format
Table Format (Edit menu)

When a newline is reached in a paste operation, Mocha W32 TN5250 will default continue to copy  data to the next field. If <Table Format> option is enabled, the program will continue to insert data on the next line, at the same column location where the paste was started.


reset configuration
Reset Terminal command (Edit menu)

Use this command to unlock the keyboard. If the default keyboard mapping is used, it is easier just to press the ESC key.


View Toolbar command
Toolbar command (View menu)

Use this command to display and hide the Toolbar, which includes buttons for some of the most common commands in Mocha W32 TN5250.

See Toolbar for help on using the toolbar.


Toolbar

The toolbar is displayed across the top of the application window, below the menu bar.  The toolbar provides quick mouse access to many tools used in Mocha W32 TN5250.

To hide or display the Toolbar, choose Toolbar from the View menu, or start program with parameter /T1


View Status Bar Command
Status Bar command (View menu)

Use this command to display and hide the Status Bar, which describes the action to be executed by the selected menu item or depressed toolbar button, and keyboard latch state. A check mark appears next to the menu item when the Status Bar is displayed.

See Status Bar for help on using the status bar.


Status Bar

The status bar is displayed at the bottom of the Mocha W32 TN5250 window.  To display or hide the status bar, use the Status Bar command in the View menu.

The left area of the status bar describes actions of menu items as you use the arrow keys to navigate through menus.  This area similarly shows messages that describe the actions of toolbar buttons as you depress them, before releasing them.  If after viewing the description of the toolbar button command you wish not to execute the command, then release the mouse button while the pointer is off the toolbar button.

The right areas of the status bar contains 4 frames:

5250 status :

OFFLINE	no connection
ONLINE	connected to a host
ONLINE-SSL	connected to a host and using SSL (Secure mode)
REQUEST	is displayed while creating a session to the IBM Host
Keyboard status:

ASCII MODE	if connected to a normal Telnet Host.
X - WAIT	data has been send to the IBM Host, and a new picture is expected
X - WRONG INPUT	cannot accept input at the cursor position
Insert status:

INSERT	if in insert mode.
RECORD	if keystrokes are saved to a file.
PLAY	if in play mode. A macro ALT 0 - 9 has been started.

Last Key status:

X-PROG ERROR	an error has been detected in the 5250 data stream
key name	last function key pressed.

Message light:

M	Message light On


about
About command (Help menu)

Use this command to display license and version number of your copy of Mocha W32 TN5250


Title Bar

The title bar is located along the top of a window.  It contains the Mocha W32 TN5250 name and

 the host connected to.


No Help Available

No help is available for this area of the window.


screen fonts
Font (Settings menu)

Changes font type and style.

Tab Options

Font

Type or select a font name. The  list is  the non proportionally spaced fonts available in your system. The screen will be scaled to the font, giving a display of 24*80 characters.

Font Style

Select a style. To use the default type style for a given font, select Regular.

The size of the characters, is controlled with the window size. The porgram will always select the largest possible font  for the screen.

Scripts

List the available language scripts for the given font.


color
Color (Settings menu)

It is possible to customize most colors in Mocha W32 TN5250. Select a color with the mouse and click OK. The number of possible colors depends of the hardware configuration. Most colors should not be changed from there default values.

•	Color Select gives the color of the area selected with the mouse in a Copy operation.


Hex key

If the keyboard does not support a national key, it is possible to enter the hexadecimal  value for the key. Select this option with button Hex, and a dialog box will pop up.

Legal values are between 40 and FE. See IBM manual : IBM 5250 Information Display System, SA21-9247-6, for the different national Character values.


proxy setup
Proxy Configuration (Settings menu)

It is possible to use a Telnet proxy server as gateway to other hosts. Mocha W32 TN5250 will connect to the proxy server and issue a new Login sequence. As there is a limited standard for how to issue this login sequence, it has been designed very dynamic for Mocha W32 TN5250.

Either Mocha W32 TN5250 can be configured to use SOCKS Version 4 protocol, or it can be defined to send

an ASCII connect sequence to the Proxy Telnet Server.

Options

Proxy host

IP address of the proxy host

Proxy port

Port number of the TN5250 server demon on the proxy server. If SOCKS Protocol is used, the default port is 1080

Proxy syntax

Format of the connect string to send at Login.

    $1 :  host

    $2 :  port

    \abc = octal value. (LF = \012 and CR = \015)

Example:

  proxy host = myproxy

  proxy port = 911

  proxy syntax =\012Connnect $1:$2\015\012

  In the connect dialog host name wintermute and port 23 is given.

  Mocha W32 TN5250 will connect to myproxy port 911, and send the connect

  sequence: <LF>Connect wintermute:23<CR><LF>

If SOCKS protocol is used, Proxy Syntax can be left unused. Any text in this field is send as USERID in the SOCKS Connect request. Some proxy servers uses this field as identification, and Guest could be a possible entry.

Proxy Return Key:

If the user as an example enter a password to the proxy server, and hereafter press <RETURN>  key, this

field defines the sequence to send. Some proxy servers wants just a LF, other CRLF.

Enable proxy server

Use this checkbox to enable the use of a proxy server.

Use Protocol SOCKS V. 4

Use this checkbox to enable the use of SOCKS Protocol Version 4.


Reset Configuration (Settings menu)

Reset all Configuration parameters in  Mocha W32 TN5250.


Mouse Double Click (Settings menu)

This menu option defines if a Double Click should act as an ENTER command.


Message Sound (Settings menu)

It is possible for the AS/400 to send a special parameter to the TN5250 with a request for

using the Bell. With this option it is possible to ignore this request.


record
Record (Settings menu)

The Record option makes it possible to capture all keyboard  actions you perform in the TN5250 emulator.  All keyboard input, which can be over several screens will be copied to a file. Later it is possible to re-play the sequence using the keys ALT 0 - 9, selecting the macro with menu right mouse key, or select the macro from the toolbar.

The recorded sequence will be saved in a file. The directory for these macro files is defined in Keyboard File

While the recorder is on RECORD will be displayed in the status line. While a file is being re-played PLAY will be shown in the status line,

It is not possible to use ALT 0 - 9 while in record mode.


license
License (Settings menu)

After ordering Mocha W32 TN5250 from MochaSoft, a license key will be received. Enter the key together with the Company Name given on the Order. As there is link between the Company name and license key it is important to enter both very careful.

If the program reports “Wrong type of License key” , please check:

1) You are using product mocha w32 tn5250. We also sell other products as

   Mocha W16 TN5250, Mocha W32 TN3270 .....

   If you need a license for another product, please send an e-mail to Mochasoft, and

   we will change the license at no cost.

2) The License name and License key must be typed as given in the

   license letter. All Upper/Lower case characters must be correct.

   The license dialog box should look as:

   -----------------------------------------------

    This product is licensed to:

    mycompany

    License key:

    B1234

    ---------------------------------------------

Where you should replace <mycompany> and <B1234> with the information from the License letter.

Still problems, please contact Mochasoft and if possible include :

 1) Product you are using and version. Select '?' icon just

    under the menu bar.

 2) Type of OS (Windows-95 NT or ...)


keyboard file
Mapping Files (Settings menu)

It is possible to customize the names of the mapping files.

Function Keys:	How to map function keys are defined in this file
EBCDIC <-> ASCII:	This file describes the mapping between the IBM Hosts Code- Page and the ASCII characters used in Mocha W32 TN5250
Language file:	This file includes all menu and dialog texts. In most cases do not change it.
Directory for record files:	This is the directory , where macro files will be stored.

Mocha W32 TN5250 contains a set of different EBCDIC files. In the right box click on a language and the program will update the filename in the EBCDIC<-> ASCII input box.


printer configuration
Printer (Settings menu)

Changes font type and style

Tab Options

Font

Type or select a font name. The  list is  the non proportionally spaced fonts available in your system.

Font Style

Select a style. To use the default type style for a given font, select Regular.

Size

Type or select a size.

Scripts

List the available language scripts for the given font.

Show printer selection box for every print job.

Click off this box, if the default printer should be used. This will prevent the printer selection dialog box to be displayed when the print function is activated.

In Version 7 a new menu option Margins has been added. It can be used to selected top

and left margin in pixels


order Mocha W32 TN5250
How to Order Mocha W32 TN5250

It is possible to buy Mocha W32 TN5250 via the Internet. Visit www.mochasoft.dk , and get the latest information about the products and prices. Also check out the Java version of Mocha TN5250.


version
How to Check for latest Version

Visit the MochaSoft home page at www.mochasoft.dk, and receive information about the latest development of the product. The version of Your copy of Mocha W32 TN5250 can be checked in menu help-about.


toolbar
Toolbar (Settings menu)

Use the Toolbar Setup dialog box to add/remove and change a button on the toolbar.

The elements ALT 0 - 9 are the scripts, which can be recorded in Record


cursor
Cursor (Settings menu)

Defines the appearance of the cursor in the terminal window:

Shape:

Underline	The cursor appears as an underscore.

Half Block	The cursor appears as a rectangle covering the bottom half of the character space.

Full Block	The cursor appears as a rectangle covering the entire character space.

Cursor Blink:

Defines if the cursor should blink on request from the AS/400

Crosshair cursor:

Displays a vertical and a horizontal line, with origin at the cursor position.

Mouse can select cursor position:

If check on (x), a click on an inactive tn5250 window will not position the cursor at the mouse. If the window is active the cursor will be placed at the mouse coordinates.


startup parameters
Parameters to Mocha W32 TN5250

Mocha W32 TN5250 can be started with a set of parameters:

/H host	: make a connection to ‘host’
/P port	: Don’t use default TN5250 port 23 on the host, but number ‘port’
/C number	: Select a configuration. Default is number  1. Values 1 - 9 is legal.
/S1	: Secure mode. Not possible to save the configuration on exit.
/R1	: Selection of host to connect is restricted. Use /H option to define the host name.
/N name	: Name will be displayed at first position of the title. As default the Host name is displayed.
/D name	: Device name for the session.
/M1	: Run without a menu bar.
/T1	: Run without a tool bar.
/i	: Use a common mtn5250.ini file for the configuration. All users of the PC will use the same.

/SILENT  : It is possible to run setup.exe with this option. It will make it possible to install the product without any user interaction.

To install tn5250 for use of a common configuration file mtn5250.ini, start setup.exe with parameter /i


configuration
Use different configurations

It is possible to use Mocha W32 TN5250 with up to 9 different configurations. As an example a red background for host MVS and a black background for host AS/400.

Use the parameter /C  , see Parameters to Mocha W32 TN5250  to startup with an unique configuration.


Change keyboard mapping

Mocha W32 TN5250 comes with a default IBM 5250 keyboard. It is possible to customize all function keys with a keyboard mapping file. See Keyboard File

It is possible to edit the keyboard file with a normal ASCII editor, or use the menu Keyboard Layout

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
LCTRL	Left Ctrl key (only valid if ctrl-c and ctrl-v option is off)
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
FIELDEXIT+ENTER	Field exit key + Enter 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 = f1 key , F1 = shift F1

# cf1 = f1 + ctrl  CF1 = shift f1 + ctrl

#

# <pc - key>  <5250 key>

f1   PF1

f2   PF2

f3   PF3


change keyboard mapping from a menu
Keyboard Layout (menu Settings)

This menu displays a dialog box , where it is possible to change the mapping of all function keys.

Select a key in the left box (PC keys). In the New 5250 function box, move the cursor to the wanted 5250 function and double click.

The PC keys are:

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
LCTRL	Left Ctrl key (only valid if ctrl-c and ctrl-v option is off)
PAUSE	Pause key
PRINT	Print key
SCROLL	Scroll Lock key
BACKSPACE	<-- key
DELETE	Del (Delete) key
f1-f12	f1 -f12 keys in normal shifted or ctrl state
CRETURN	Left CTRL + RETURN KEY
CENTER	Left CTRL + 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
FIELDEXIT+ENTER	Fieldexit + Enter
REAL-	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
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

Field exit deletes character at position:

If the cursor is at the last position of a field, and the user has not entered a new character here, and

 field-exit or field +- is pressed, the character will be deleted.

Numlock Del key swap between <.> and <,>:

As different PC keyboards have been seen giving different results for the keypad Del key, this option

can be used to swap the value of the key.

Check for field exit key required:

Rejects the operator if Field exit is not used in a field-exit required field

Enable Hotspots

TN5250 can display all Fx and Fxx objects on the 5250 screen as keys, meaning it is possible to click

these with the left mouse key.

Insertion fails if no space in a field

If there is no room for characters in a field, TN5250 will ignore user input and display an error message

in the status line. This will only happen in insert mode.

Mouse wheel scrolling works as Page up/down

On some types of mouse devices, it is possible to scroll with a wheel. In TN5250 the scroll option can be used to send page up or page down commands to the AS/400.

Shift arrow as select

If used, this option will allow the user to hold down shift, and with the arrows mark an area. Such an area can later be copied to the clipboard.


change ebcdic-ascii mapping from a menu
EBCDIC Translation (menu Settings)

This menu displays a dialog box , where it is possible to change the mapping of the current in use EBCDIC-ASCII Table. This option should only be used of experienced Users.

How to change the mapping:

Select an EBCDIC Character value in the left box (EBCDIC Values). In the Current ASCII Mapping box is displayed the current mapping. To change it, double click at a new value in the New ASCII Mapping  box.

How to Insert a new element:

Point at the position, where the new value should be inserted in  box EBCDIC Values. Press the Ins key, and a dialog box with an input field for the new value is displayed.

How to Delete an element:

Point at the element to delete in the EBCDIC value box, and press the Del key.

Warning:

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 have value 0x50 before value 0x40 (both defined as ASCII 0x20)

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

The Separator character is default EBCDIC value 01, and ASCII 0xb7 (a dot). It is possible to give the separator another ASCII value, as an example space (0x20)


How to Press PF18 key with default keyboard

A standard PC keyboard will only have keys F1 - F12. These are mapped to PF1 -  PF12. To Select keys higher than PF12 with the default  mapping :

Shift F1	= F13
Shift F2	= F14
Shift F3	= F15
Shift F4	= F16
Shift F5	= F17
Shift F6	= F18
Shift F7	= F19
Shift F8	= F20
Shift F9	= F21
Shift F10	= F22
Shift F11	= F23
Shift F12	= F24

Remark, it is possible to change the default mapping. See Keyboard mapping


keyboard mapping
5250 Keyboard mapping

Mocha W32 TN5250 comes with a default 5250 keyboard.

 PC-Key     5250-Key           PC-Key           5250-Key

-------------------------------      -----------------------------------

  f1              f1                         crtl f1              Attn

  f2              f2                         ctrl f2              SysReq

  f3              f3                         ctrl f3              INSERT

  f4              f4                         ctrl f4              ERASE INPUT

  f5              f5                         ctrl f5              DUP

  f6              f6                         ctrl f6              -

  f7              f7                         ctrl f7              -

  f8              f8                         ctrl f8              -

  f9              f9                         ctrl f9              -

  f10            f10                       ctrl f10             -

  f11            f11                       ctrl f11             -

  f12            f12                       ctrl f12             -

 PC-Key     5250-Key          PC-Key          5250-Key

-------------------------------      ------------------------------------

  shift f1        f13                     ctrl shift f1        HELP

  shift f2        f14                     ctrl shift f2        CLEAR

  shift f3        f15                     ctrl shift f3

  shift f4        f16                     ctrl shift f4        -

  shift f5        f17                     ctrl shift f5        -

  shift f6        f18                     ctrl shift f6        -

  shift f7        f19                     ctrl shift f7        -

  shift f8        f20                     ctrl shift f8        LAST

  shift f9        f21                     ctrl shift f9        BEGIN

  shift f10      f22                     ctrl shift f10      END

  shift f11      f23                     ctrl shift f11       -

  shift f12      f24                     ctrl shift f12       -

Editing keys:

 PC-Key                5250-Key

----------------------------------------

HOME	Record
END	end of the field
PAGE UP	Page Up (Roll Down)
PAGE DOWN	Page Down (Roll Up)
INSERT	INSERT
ESC	Reset (open keyboard)
RETURN	Enter
CRETURN	NEWLINE
CENTER	NEWLINE
SHIFT ENTER	Fieldexit + Enter
SHIFT TAB	Previous Field
TAB	Next Field
Right CTRL	ENTER
PRINT	Print request key
Left CTRL	RESET
PAUSE	RESET (open keyboard)
SCROLL LOCK	CLEAR
DEL	Delete character at cursor position
BACKSPACE	Delete character to the left of the cursor
Keypad -	Field -
Keypad +	Field
Keypad Enter	Field Exit

If arrow keys are pressed together with left ctrl key, the cursor will move 3 positions, instead of 1.


Reference

Mocha W32 TN5250 is an application written for Windows-95/98/ME/NT/2000/XP. It makes it possible to connect to a host via TCP/IP with the TN5250 protocol and emulate a 5250 work station.

•	Supports all standard 5250 emulation features

•	Alternate screen size (24x80 or 27x132)

•	SSL (secure socket layer) Support DES algorithm with key length 56 and 128 bits.

•	Small and fast. The package is only 231 K

•	User defined functions keys

•	Device name support

•	Hotspots (Fx and Fxx text on the 5250 screen can be used as buttons)

•	Last Transaction Time Indicator

•	Hardcopy of screen

•	Mail support

•	Mouse wheel support

•	Proxy login

•	Keyboard macro support

•	Possible to configure the toolbar

•	Many trim parameters

•	Menu and Dialog Text in a separate file, makes it possible to customize the language of the program

•	Online Help


Technical Support

Visit the MochaSoft home page at www.mochasoft.dk, and receive information about how to contact MochaSoft. Collect a trace file with option Log Traffic


keyboard mapping window
Keyboard Mapping (HELP MENU)

This menu option displays the current mapping of the keyboard.


Window size

It is possible to change the size of the window, with simply drag the window border of Mocha W32 TN5250. The character font size will be recalculated to the largest possible font.


installation
Customize Installation

From Version 2.0, it is possible to define the configuration for Mocha W32 TN5250, before running setup.exe. A file named config52.txt includes all possible parameters for the program. At installation these parameters will be copied to the Registry in Windows.

As default config52.txt contains only lines starting with #, meaning comments. To enable a parameter remove the # from the given parameter.

Config52.txt file will only be used at the installation. If a new version is installed, parameters from config52.txt will not overwrite the already defined parameters in the Registry. If a line

OVERWRITE

is included in the file, the elements not marked with a # will overwrite the registry.

Remark it is possible in the config52.txt file to define parameters to the shortcut. If the User should only access a single  AS/400, using the parameter /H could be a good idea.


timing mark
TN_TIMING_MARK

If strange TN_TIMING_MARK statements are displayed sometimes on the tn5250 screen, it is because option Show Negotiation in settings menu has been enabled.


Character mapping
ASCII - EBCDIC mapping

As IBM hosts uses different codepages, it is not possible to include all possible types of layout in Mocha TN5250.

File ebcdic52.map contains an (US) ASCII - EBCDIC table, which will work in most cases. If national characters are used, check the README.TXT file, to see if the wanted national mapping file has been included in the package. If not, it is necessary to change the ebcdic52.map file. It can be done with any ASCII editor, or with Menu EBCDIC Translation

Which translation table to use is defined in menu Settings Mapping Files

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 above 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.

Mocha W32 TN5250 comes with following layouts:

  ebcdic.map   : US layout (default)

File ebcdic.map

============

Mocha TN5250 comes with an ASCII - EBCDIC layout as:

	0	1	2	3	4	5	6	7	8	9	A	B	C	D	E	F
0	SP				SP	&	-	ø	Ø	°	µ	^	{	}	\	0
1					SP	é	/	É	a	j	~	£	A	J		1
2					â	ê	Â	Ê	b	k	s	¥	B	K	S	2
3					ä	ë	Ã	Ë	c	l	t	·	C	L	T	3
4					à	è	À	È	d	m	u	×	D	M	U	4
5					á	í	Á	Í	e	n	v	§	E	N	V	5
6					ã	î	Ã	Î	f	o	w	¶	F	O	W	6
7					å	i	Å	Ï	g	p	x	¼	G	P	X	7
8					ç	ì	Ç	Ì	h	q	y	½	H	Q	Y	8
9					ñ	ß	Ñ	`	i	r	z	¾	I	R	Z	9
A					¢	!	|	:	«	ª	¡	[	­	¹	²	³
B					.	$	,	#	»	º	¿	]	ô	û	Ô	Û
C					<	.	%	@	ð	æ	Ð	¯	ö	ü	Õ	Ü
D					(	)	_	‘	ý	¸	Ý	¨	ò	ù	Ò	Ù
E					+	;	>	=	Þ	Æ	þ	´	ó	ú	Ó	Ú
F					|	¬	?	“	±	¤	®	©	õ	ÿ	Õ
SP = space

Above EBCDIC value 0xd4 = 'M'

See also menu option  Mapping Files


Toggle trace of session data


Show Telnet negotiation on the terminal screen


Select which file to use for trace data


Browse the harddisk for a file to use


Click here to display an overview of this window


Toggle if this button should be part of the toolbar


Text displayed on the specified toolbar button


Enter the name of the AS/400 host to connect to


Select more details for the session


Enter the host port number to use. Default Telnet port is 23


Toggle if a session should be started without user action, when this program starts.


If the session with the AS/400 is terminated, a new session will be created without any User action.


If the  AS/400 terminates the session, Mocha W32 TN5250 will close without any notification.


If mocha w32 tn5250 is terminated and a session is active, an exit confirm box will be shown.


IP address of the proxy host


Port number of the TN5250 server demon on the proxy server. If SOCKS Protocol is used, the default port is 1080


Format of the connect string to send at Login.


If the user as an example enter a password to the proxy server, and hereafter press <RETURN>  key, this field defines the sequence to send. Some proxy servers wants just a LF, other CRLF.


Use this checkbox to enable the use of a proxy server.


Use this checkbox to enable the use of SOCKS Protocol Version 4.


License name as defined in the license letters


License keyword as defined in the license letter.


How to map the keyboard is defined in this file


 This file describes the mapping between the IBM Hosts Code- Page and the ANSI characters used in Mocha W32 TN5250


This is the directory , where macro files will be stored.


Click on a language and the program will update the filename in the EBCDIC<-> ASCII input box.


Select the type of 5250 Information System terminal to emulate.


Select the device name for this session


Defines the appearance of the cursor in the terminal window


Defines if the cursor should blink on request from the AS/400


Displays a vertical and a horizontal line, with origin at the cursor position.


If check on (x), a click on an inactive tn5250 window will not position the cursor at the mouse. If the window is active the cursor will be placed at the mouse coordinates.


List of PC keys, which can be selected a 5250 function


List of 5250 functions, which can be assigned to a PC key


Current value for a PC key


If the cursor is at the last position of a field, and the user has not entered a new character here, and

 field-exit or field +- is pressed, the character will be deleted.


The Click box: Numlock  <,> sends <.>  can be used to redefine the value of this key


Rejects the operator if Field exit is not used in a field-exit required field


D


D


D


File Print command
Print command (File menu)

Use this command to print a copy of the screen.   This command presents a Print dialog box, where you may specify the number of copies, the destination printer, and other printer setup options.


Print dialog box

The following options allow you to specify how the screen should be printed:

Printer

This is the active printer and printer connection.  Choose the Setup option to change the printer and printer connection.

Setup

Displays a Print Setup dialog box, so  you can select a printer and printer connection.

Copies

Specify the number of copies you want to print for the above page range.


Print Progress Dialog

The Printing dialog box is shown during the time that Mocha W32 Telnet is sending output to the printer.  The page number indicates the progress of the printing.

To abort printing, choose Cancel.


File Print Setup command
Print Setup command (File menu)

Use this command to select a printer and a printer connection.  This command presents a Print Setup dialog box, where you specify the printer and its connection.


Print Setup dialog box

The following options allow you to select the destination printer and its connection.

Printer

Select the printer you want to use.  Choose the Default Printer; or choose the Specific Printer option and select one of the current installed printers shown in the box.  You install printers and configure ports using the Windows Control Panel.

Orientation

Choose Portrait or Landscape.

Paper Size

Select the size of paper that the document is to be printed on.

Paper Source

Some printers offer multiple trays for different paper sources.  Specify the tray here.

Options

Displays a dialog box where you can make additional choices about printing, specific to the type of printer you have selected.

Network...

Choose this button to connect to a network location, assigning it a new drive letter.


File Page Setup Command
Page Setup command (File menu)