Version 6.3.8 for Windows
 —  Remote Development Using SPoD  —

Terminal Emulation

A terminal emulation window (which is not Unicode-enabled) is used in a remote development environment to display non-GUI information. This is different from the local environment where the output is shown in an output window.

Exception: In a remote Windows environment, the Natural Web I/O Interface client is always used instead of a terminal emulation window.

This document covers the following topics:

Important:
For running terminal emulation, the Microsoft Windows Personal Firewall must be deactivated. See Configuring the Microsoft Windows Personal Firewall to Run Natural in the Operations documentation for further information.


About Terminal Emulation

When specific parameters have been set on the Natural Development Server (see below), the terminal emulation window is used instead of the Natural Web I/O Interface client.

The following example shows the terminal emulation window containing the output of a program that has been executed in a remote environment.

Terminal emulation

Terminal emulation enables you to test a complete application, including all of its character output, without having to leave Natural Studio. A screen output of an executed program automatically causes the terminal emulation window to be opened and to be closed again when the program terminates (logically, the development server session reaches the NEXT level).

The terminal emulation window cannot be closed manually using the standard Windows close button. As long as terminal emulation is active, you cannot work with Natural Studio.

Utilities for which Natural Studio does not offer a graphical user interface in the remote environment are also made available by terminal emulation. Entering the corresponding system command in Natural Studio's command line automatically opens the terminal emulation window.

Top of page

Prerequisites for the Natural Development Server

So that the terminal emulation window can be invoked, the Natural development server (NDV) has to be configured as follows:

Top of page

Working in a Terminal Emulation Screen

In a the terminal emulation screen, you can use both mouse and keyboard. To change the cursor position, use the standard keys (e.g. TAB or the arrow keys) or the mouse. To use a host function key, press the terminal emulation key assigned to this function key. To simulate the ENTER key, double-click any position in the terminal emulation screen. Otherwise, you can use your keyboard to enter data as normal.

Top of page

Displaying a Keypad

A keypad contains buttons that represent host function keys. You can display several keypads in the terminal emulation window. The following is an example of the keypad containing the 3270 keys.

graphics/spod-keypad.png

Start of instruction setTo switch the display of a keypad on and off

Top of page

Transferring Data Using the Clipboard

Using the commands from the Edit menu, you can copy or cut a terminal emulation screen (or part of it) and paste it somewhere else (for example, in another terminal emulation screen or in a PC application, such as, Microsoft Word). You can also copy or cut text from a PC application and paste it in a terminal emulation screen. Cut or copied data is stored on the Windows Clipboard.

You must first select the desired text before you can use the Cut, Copy or Append Copy command.

The following rules apply for a terminal emulation screen:

Unless indicated otherwise, the left mouse button is always used. The right mouse button is used to select the Edit menu commands from a context menu.

Start of instruction set To select part of a terminal emulation screen (mouse usage)

  1. Move the mouse pointer to the beginning of the text you want to select.

  2. Press and hold down the left mouse button.

    This clears any previous selection.

  3. Drag the mouse until all desired text is selected.

  4. Release the mouse button.

    You can now cut, copy or append the selected text.

Start of instruction setTo select part of a terminal emulation screen (keyboard usage)

  1. Use the arrow keys to move the cursor to the beginning of the text you want to select.

    This clears any previous selection.

  2. Press and hold down SHIFT.

  3. Use the arrow keys to select the desired text.

  4. Release SHIFT.

    You can now cut, copy or append the selected text.

    Note:
    When holding down CTRL+SHIFT and then using the arrow keys, all text to the end of the line (with RIGHT-ARROW) or to the bottom of the screen (with DOWN-ARROW) is selected.

Start of instruction setTo select the entire content of the terminal emulation screen

Start of instruction setTo cancel the selection

Start of instruction setTo delete the selection in an unprotected field

Start of instruction set To copy the selection and append it behind existing text in the clipboard

Start of instruction set To cut the selection and transfer it to the clipboard

Start of instruction set To copy the selection to the clipboard

Start of instruction set To paste the content of the clipboard into a terminal emulation screen

  1. Move the cursor to the position at which the text is to be inserted.

  2. From the Edit menu, choose Paste.

    Or:
    Press CTRL+V.

    The content of the clipboard is inserted at cursor position.

Top of page

Modifying the Font

You can define another font to be used for terminal emulation.

Start of instruction setTo modify the font

  1. From the Session menu, choose Font.

    The Fonts dialog box appears.

    Font

  2. Define the desired font and font style.

    The Adjust the font size to the window size check box applies to raster fonts only. For TrueType fonts, automatic resizing is always enabled. Select this check box to adjust the size of the selected font to the window size. Adjusting the font size is done by increasing or reducing the spacing between characters and lines. This may result in truncated characters.

    The Script drop-down list box contains a list of all available language scripts for the selected font. Make sure to specify a script that is compatible with the language that has been set up for your computer.

  3. Choose the OK button.

Top of page

Modifying the Color Scheme

You can define another color scheme to be used for terminal emulation.

Start of instruction setTo activate another color scheme

  1. From the Session menu, choose Color.

    The Color Selection dialog box appears.

    Color selection

    The dialog box lists all color schemes that are available for the currently connected environment (for example, mainframe).

    The active color scheme is indicated by an arrow. When the lock symbol next to the color scheme name shows a green check mark, the color scheme can be modified. When it shows a red cross, it cannot be modified; it can only be duplicated in this case.

  2. Select the color scheme you want to activate.

  3. Choose the OK button.

Command Buttons

Besides activating another color scheme, you can also create, modify, delete or duplicate a color scheme. To do so, use one of the following command buttons in the Color Selection dialog box:

Command Button Description
Modify Modifies the selected color scheme. You can only modify the color scheme which is currently active. If you select another color scheme, you are asked whether you want to make the selected color scheme active in order to continue.
New Creates a new color scheme. Specify a name for the new color scheme in the resulting dialog box and choose the OK button. You are then asked whether you want to make the new color scheme active in order to modify it.
Delete Deletes the selected color scheme. You are asked to confirm the deletion. The predefined color schemes cannot be deleted.
Duplicate Creates a copy of the selected color scheme. Specify a name for the copy in the resulting dialog box and choose the OK button. You are then asked whether you want to make the copy active in order to modify it.

Detailed information on the dialog box which appears when you create, modify or duplicate a color scheme is provided below. Depending on the currently connected environment, one of the following dialog boxes appears:

The color scheme name can be up to 32 characters long and may contain blanks. It can only be specified when adding a new color scheme. Later, the name cannot be modified.

Mainframe Color Scheme

Mainframe color scheme

When you move the mouse pointer over the sample screen that is shown in the Mainframe Color Scheme dialog box, tooltips appear. The name of the base (field) color or extended color attribute is shown on the left of the tooltip. The name of the background color is shown on the right of the tooltip.

Start of instruction setTo define other colors

  1. Select a text entry from the first drop-down list box in one of the following group boxes:

  2. Select the desired color from the corresponding drop-down list box to the right.

    This drop-down list box also provides the following buttons:

  3. Repeat the above steps until all desired colors have been defined. The Mainframe Color Scheme dialog box always reflects the current color settings.

  4. Optional - choose the Apply button to save the current color settings without closing the dialog box.

  5. Choose the OK button.

VT Color Scheme

VT color scheme

When you move the mouse pointer over the sample screen that is shown in the VT Color Scheme dialog box, tooltips appear. The following applies for the ANSI color attributes: the name of the foreground color is shown on the left of the tooltip, and the name of the background color is shown on the right of the tooltip.

Start of instruction setTo define other colors

  1. Select a text entry from the first drop-down list box in one of the following group boxes:

  2. Select the desired color for an ANSI color attribute from the corresponding drop-down list box to the right.

    This drop-down list box also provides the following buttons:

  3. Repeat the above steps until all desired colors have been defined.

    The VT Color Scheme dialog box always reflects the current color settings.

  4. Optional - choose the Apply button to save the current color settings without closing the dialog box.

  5. Choose the OK button.

Top of page

Printing the Contents of a Terminal Emulation Screen

You can print the contents of the terminal emulation screen on a printer that is defined under Windows.

Start of instruction setTo preview the screen to be printed

  1. From the Session menu, choose Print Preview.

    The print preview window appears.

  2. Optionally: use the Zoom In and Zoom Out buttons to view the information in this window. Or choose the Print button to invoke the Print dialog box.

  3. To return to the terminal emulation screen, choose the Close button.

Start of instruction setTo print the screen contents using a dialog box

  1. From the Session menu, choose Print.

    Or:
    Press CTRL+P.

    The Print dialog box appears.

  2. Choose the OK button to print the current screen.

Start of instruction setTo print the screen contents directly, without displaying a dialog box

Top of page

Terminal Emulation Keys

Keys such as PF1 or PA1 which start a terminal function can be used either by choosing the corresponding button in a keypad or by pressing the corresponding key combination.

The following table lists all available key combinations. When you have to press SHIFT or CTRL, this is indicated by an X. For example, when you want to use PF13, you have to press SHIFT+F1.

Terminal Keyboard PC Keyboard
3270 Key SHIFT CTRL F-Key
CLR   X F1
ENTR   X F2
EEOF   X F3
ERI   X F4
INS   X F5
NLIN   X F6
HOME   X F7
PA1   X F8
PA2   X F9
PA3   X F10
PF1 through PF12     F1 through F12
PF13 through PF24 X   F1 through F12
RESET   X F11

Top of page

Using Non-Latin Character Sets

By default, the Latin character set is used for terminal emulation (3270 translation).

You can define a different character set (e.g. Cyrillic) to be used for the terminal emulation. See Workspace Options in the documentation Using Natural Studio for further information.

Note:
When you define another character set, you may have to modify the font of the terminal emulation. See Modifying the Font.

Top of page

Translation Tables

Translation tables convert characters when sending or receiving data to or from a host while using terminal emulation. Translation tables contain hexadecimal values which correspond to a national code page.

The following topics are covered below:

Translation Table Files

Each language setting has its own translation file. This file contains the character translation tables for translations from the PC to the host and vice versa. The file name reflects the communication mode. The extension of a translation file is ".tra".

In the case of a default installation, the translation files can be found in the following folder:

..\Program Files\Software AG\Natural\<version-number>\etc

The following translation files are available:

These files give you the opportunity to create your own character translation tables.

Each file contains two translation tables where each table corresponds to one communication direction (one for sending and one for receiving). Example:

The table names contain the following information:

Part of Name Description
ASC2 or 2ASC Code page on the PC. Standardized name convention.
xxx Code page on the host. Can be defined by the user.
yy Language. Can be defined by the user.

Table Structure

The table for PC-to-host communication contains the hexadecimal values for the host code page. The row and column names correspond to the hexadecimal value of the PC code page.

The table for host-to-PC communication contains the hexadecimal values for the PC code page. The row and column names correspond to the hexadecimal value of the host code page.

The first set of characters of the hexadecimal value indicates the row and the second set indicates the column.

Example

The character "b" in the file N3270_USER1.tra has the following hexadecimal values:

Code Page (communication from) Hexadecimal Value Location
Host 82 Row 08, column 02
PC 62 Row 06, column 02

Adapting and Importing Translation Tables

Translation tables must be adapted in the following situations:

To adapt a translation table, use a code page which corresponds to the host or PC code page settings. You can obtain code pages as graphics from http://www.microsoft.com/globaldev/; look for a link to "References > Code Pages".

Important:
Make backups of all ".tra" files before beginning.

When the translation tables have been adapted, you have to import them as described below. Entire Connection's Configuration Manager is used for importing the translation tables. With a default installation, the file PCCAdmin.exe, which invokes the Configuration Manager, is provided in the following Natural folder:

..\Program Files\Software AG\Natural\<version-number>\Terminal\Config

Note:
Documentation for Entire Connection's Configuration Manager can be found at http://documentation.softwareag.com/.

Start of instruction setTo import the adapted translation tables

  1. Execute the file PCCAdmin.exe to start the Configuration Manager.

    If user information is required, a logon dialog box appears

  2. In the logon dialog, enter your user name and, if required, password. The default user name is "SYSTEM".

  3. From the File menu choose Open Share File.

  4. In the resulting dialog box, select the file NATSHARE411.sag and choose the Open button. This file is located in Natural's etc folder which also contains the translation table files.

  5. In the left pane of the Configuration Manager, expand the node Tables and then select the node Translation.

  6. From the Edit menu, choose Import Table.

  7. In the resulting dialog box, select the translation table files that you want to import and choose the Import button.

  8. Confirm that the translation tables for the user-defined files are to be overwritten.

    Natural's user-defined files contain the following translation tables:

    ASC2(Ansi)EBCDICUser1
    ASC2(Ansi)EBCDICUser2
    ASC2(Ansi)EBCDICUser3
    ASC2(Ansi)EBCDICUser4
    EBCDICUser1(Ansi)2ASC
    EBCDICUser2(Ansi)2ASC
    EBCDICUser3(Ansi)2ASC
    EBCDICUser4(Ansi)2ASC

  9. So that a translation table can be used in Natural, it has to be specified in Natural Studio's workspace options. See Workspace Options in the documentation Using Natural Studio.

Adapting Translation Tables for Natural Development Server under BS2000/OSD

For the Natural Development Server under BS2000 the translation tables have to be adapted as follows:

ASC2EBCDIC

Position Value Character
C4 BB Ä
D6 BC Ö
DC BD Ü
DF FF ß
E4 FB ä
F6 4F ö
FC FD ü

EBCDIC2ASC

Position Value Character
BB C4 Ä
BC D6 Ö
BD DC Ü
FF DF ß
FB E4 ä
4F F6 ö
FD FC ü

Correcting a Wrong Conversion

This example tells you what you can do if the backslash (\), which is a special character, is not converted correctly in the file N3270_USER1.tra.

Start of instruction setTo correct a wrong conversion

  1. Make a backup of the file N3270_USER1.tra.

  2. Look up the hexadecimal values for the backslash character. The following values are used in this example:

  3. Edit the file N3270_USER1.tra.

  4. Go to row 05 and column 0C in table ASC2(Ansi)EBCDICGR.

  5. Enter the hexadecimal value for the host which is "EC".

  6. Go to row 0E and column 0C in table EBCDICGR(Ansi)2ASC.

  7. Enter the hexadecimal value for the PC which is "5C".

  8. Save the file N3270_USER1.tra.

  9. Import the changed file N3270_USER1.tra.

Top of page