The Natural Termcap (NATTERMCAP) utility is used to create, modify and test terminal capabilities used by Natural. These terminal capabilities are stored in the terminal database SAGtermcap.
Since there are no standard terminal type definitions, Software AG does not assume any responsibility for the completeness and the correctness of the terminal types contained in SAGtermcap. A terminal type standard used for Digital Equipment Corporation's VT terminals is ANSI X3.64 (corresponds to ISO 6429).
The Natural Termcap Utility documentation covers the following topics:
This section provides information on environment variables and parameters that can be used to specify general settings of the Natural Termcap utility. For the parameters that can be specified when invoking the Natural Termcap utility, see Dynamic Parameters.
The Natural Termcap utility uses the following environment variables:
Variable | Explanation |
---|---|
TERM
|
Used for the currently active terminal type. |
NATTERM
|
Used for the Natural terminal type. If this
variable is not set or defined, the value assigned to
TERM (see above) is used.
|
NATTCAP
|
Used to specify a different terminal database than SAGtermcap. |
COLUMNS
|
Used for terminal-screen width. If this variable
is not set or defined, the current screen width is used. Otherwise, the value
assigned to the capability co is used.
|
LINES
|
Used for terminal screen page size. If this
variable is not set or defined, the current screen page size is used.
Otherwise, the value assigned to the capability li is used.
|
The Natural Termcap utility is a screen I/O application. Therefore, it needs a terminal database and a terminal type to display menus and windows on the screen. By default, the Natural Termcap utility uses the same terminal database and type that Natural uses.
Natural retrieves the terminal type as follows:
It takes the contents of the environment variable
NATTERM
.
If NATTERM
is not set or defined, it
takes the contents of the system environment variable
TERM
.
Natural retrieves the terminal database as follows:
It takes the contents of the environment variable
NATTCAP
.
If NATTCAP
is not set, it retrieves the
terminal database name from the NATTCAP
entry in
the local configuration file NATURAL.INI.
If this terminal database could not be found, the Natural Termcap utility tries to locate a terminal database named SAGtermcap in the current directory.
To avoid this automatism, the Natural Termcap utility offers a
predefined terminal database in the dynamic parameter
TERMCAP
with a limited number of terminal types. These types can be accessed by
specifying the dynamic parameter DISPLAY
.
The following table gives an overview of unprintable characters, as well as characters that have a special meaning in terminal capability syntax:
Control Code | Explanation |
---|---|
\E
|
Escape character |
\b
|
Backspace character |
\n
|
New line |
\r
|
Carriage return character |
\t
|
Tab character |
\xxx
|
Octal value of xxx; must be three characters |
\072
|
The character colon (:); the Natural Termcap utility uses the colon (:) as an internal separator |
^x
|
Control-x, where x is any letter |
If the function key PF10 is to be defined as F10 on a DEC VT220 terminal, the code of F10 is:
<ESCAPE>[21~
Specify the following for capability PF10:
\E[21~
If the character tilde (~) is not available on the keyboard, use the octal value of tilde instead. Tilde is defined as octal 176. The alternative specification is then:
\E[21\176
To invoke the Natural Termcap utility
At the operating system prompt, enter the following:
natvrtermcap [dynamic-parameters]
where vr
denotes the Natural version and release number and
dynamic-parameters
denotes one or more
parameters that can be specified with the command (see
Dynamic
Parameters).
The NATURAL Termcap Utility screen appears with the name of the currently active terminal in the top right-hand corner of the screen.
The screen provides the following menu options:
Menu | Explanation |
---|---|
Creates, reads, saves and deletes a terminal entry. | |
Views and sets terminal capabilities. | |
Searches for a specific capability by name. | |
Tests capabilities. | |
Modifies the default key definition and shows or hides terminal copy capabilities. Terminal copy capabilities are capabilities included from another terminal entry. | |
Provides help on each capability and on the usage of the dynamic parameters. |
The menus provided on the NATURAL Termcap Utility screen are explained in the following sections.
The dynamic parameters that can be supplied with the
NATTERCAMP
command when invoking the Natural Termcap
utility are described in the following section. These parameters provide quick
access to the capabilities of a terminal type. As an alternative, you can use
the menu options provided on the NATURAL Termcap Utility
screen.
For explanations of the symbols used in the parameter syntax, refer to System Command Syntax in the System Commands documentation.
Dynamic Parameter | Explanation | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DISPLAY |
|
||||||||||||||||||||||||||||||||||||||
EDIT
|
Used to view and/or modify a specific terminal capability. If the capability is found, the associated window is displayed and the cursor is positioned in the specified field. If the capability cannot be found, an error message will be displayed and the Natural Termcap utility terminates. Syntax:
Capability:
Any terminal capability known in Natural can be specified. A list of capabilities can be found in the sections Terminal Capabilities - Overview and Terminal Capabilities - Sorted by Name. |
||||||||||||||||||||||||||||||||||||||
EXIT
|
Used to terminate the utility after all parameters have been processed. Example:
After modifying the function key PF10, the utility terminates immediately. |
||||||||||||||||||||||||||||||||||||||
HELP |
|
||||||||||||||||||||||||||||||||||||||
REPORT
|
Used to create by default a text file with a detailed description of the current terminal in the Natural TMP directory. Syntax:
where If no name is specified,
|
||||||||||||||||||||||||||||||||||||||
SAVE
|
Used to save all modifications of the current terminal entry. Syntax:
where If no name is specified, the current
|
||||||||||||||||||||||||||||||||||||||
TERM
|
Used to read in a different terminal entry. If this parameter is
not specified, the current Natural terminal type is used
( Syntax:
where |
||||||||||||||||||||||||||||||||||||||
TERMCAP
|
Used to work with a different terminal database. If this parameter
is not specified, the current Natural terminal database is used
( Syntax:
where |
||||||||||||||||||||||||||||||||||||||
TEST |
|
To terminate the Natural Termcap utility
From the
menu, choose .Or:
Set the EXIT
parameter as
described in Dynamic Parameters.
The Natural Termcap utility is terminated and the operating system prompt appears.
Terminal copy capabilities (TCs) are capabilities transferred from
another terminal entry, like the #include
directive of a C
program. However, if capabilities are already defined in the current entry, the
transferred capabilities are ignored. This makes the entries more efficient,
not only by reducing redundancies, but also by ensuring that related entries
are kept consistent. Capabilities read from a terminal copy entry are marked
with [TC]
to the right of the input field. Additionally, the name
of the entry from where this capability is transferred is shown in the top
right corner of the menu, above the terminal name.
Once a terminal capability has been modified, it loses the link to the transferred terminal entry and the modification is made to the current terminal entry.
To display the current terminal entry without any terminal copy capabilities
On the NATURAL Termcap Utility screen, choose Terminal Copy Capabilities from the menu.
The Terminal Copy Capabilities window appears.
Select HIDE.
Assume TERM
is set to vt100
and the
vt100 (vt220) terminal entry in the terminal database looks as follows:
ti = \E = ESC = \E ETO = 300 tc = vt220
ti = \E[0m cr = \r
The combined terminal entry for the terminal type vt100 would be:
ti = \E = /* taken from the original vt100 entry ESC = \E /* taken from the original vt100 entry ETO = 300 /* taken from the original vt100 entry cr = \r /* transferred from vt220 entry
The capability ti( = \E[0m)
from the vt220 terminal is
ignored, because ti
is
already defined in the vt100 entry.
The function keys provided in the definition windows of the Natural Termcap utility are described in the following table:
Key | Explanation |
---|---|
CTRL+A | Inserts ANSI definitions. |
CTRL+E | Evaluates keys automatically. |
CTRL+N | Inserts non-graphic characters for frames. |
CTRL+P | Gets help. |
CTRL+V | Tests capabilities. |
To modify the predefined function keys
On the NATURAL Termcap Utility screen, choose Key Assignments from the menu.
The Key Assignments window appears.
Modify the required function key(s) listed under the Key Name column.
You can only specify control keys (CTRL+A to CTRL+Z).
When you select NATURAL Termcap Utility screen, a selection list containing the following functions is displayed:
from theFunction | Explanation |
---|---|
Creates a new terminal entry in the current terminal database. | |
Reads a terminal entry from the terminal database. | |
Saves terminal capabilities to the current terminal entry. | |
Saves terminal capabilities to a different or new terminal entry. | |
Removes the current terminal entry from the terminal database. | |
Generates a text file including information about
the description, aliases and capabilities of the current terminal entry. The
text file will be stored by default in the Natural TMP directory as
terminal-name.txt , for example,
xterm.txt .
|
|
Moves the terminal entry physically to the top of the terminal database. If a terminal is on top of the database, the access time during the terminal initialization will be improved. | |
Allows working with a terminal database other than Natural's SAGtermcap. | |
Saves the whole terminal database and all terminal entries with a different path and/or name than Natural's SAGtermcap. | |
Displays detailed information about the terminal database, terminal entry, environment variables and display type. | |
Exits the Natural Termcap utility. |
When you select NATURAL Termcap Utility screen, a selection list containing all capabilities grouped by topic is displayed:
from theAfter you have selected a topic, the corresponding window is displayed in which you can edit individual Natural terminal capabilities.
Depending on the window displayed, the following different types of input fields are provided:
boolean, where only ON
or OFF
can be
specified.
numeric, where only digits (0 to 9) can be specified.
string, where 32 alphanumeric characters can be specified, with the
exception of terminal capabilities te
and ti
, for which 132 characters can be
specified;
description, where 132 alphanumeric characters can be specified.
For further information on the individual Natural terminal capabilities to be edited, see the sections Terminal Capabilities - Overview and Terminal Capabilities - Sorted by Name.
When you select NATURAL Termcap Utility screen, a selection list containing all capabilities sorted by name is displayed: see Terminal Capabilities - Sorted by Name. After you have selected a capability, a window is displayed which corresponds to the window invoked with the appropriate menu option.
from theWhen you select NATURAL Termcap Utility screen, a selection list containing the following functions is displayed:
from theFunction | Explanation |
---|---|
Tests all foreground and background colors. | |
Searches for inconsistent key definitions. A list of affected keys is displayed if they are not unique. | |
Displays the name of a pressed key. Leave this functions by pressing one of the following character keys: E, Q, X, or . (period). | |
Tests the graphic line capabilities used for drawing window frames. | |
Tests all video attributes. |
When you select NATURAL Termcap Utility screen, a selection list containing the following functions is displayed:
from theFunction | Explanation |
---|---|
Shows or hides the terminal capabilities included
from a different terminal entry specified by the capability
tc .
|
|
Modifies the default key assignments of the utility. |
When you select NATURAL Termcap Utility screen, a selection list containing the following functions is displayed:
from theFunction | Explanation |
---|---|
Invokes a detailed help section for a given topic,
such as NAME , REPORT , TC or
TEST .
|
|
Invokes a detailed help section for each capability. | |
Displays information on how the dynamic parameters are used. | |
Displays product information. |
This section provides an overview of all terminal capabilities sorted by topic. The topics correspond to the items in the Edit menu.
Name | Description |
---|---|
ct | Terminal type: color (ON ) or
monochrome (OFF )
|
bgbla | Screen background color |
fgblu | Foreground color blue; Natural color definition
CD=BL (*)
|
fggre | Foreground color green; Natural color definition
CD=GR (*)
|
fgmag | Foreground color pink; Natural color definition
CD=PI (*)
|
fgred | Foreground color red; Natural color definition
CD=RE (*)
|
fgcya | Foreground color turquoise; Natural color
definition CD=TU (*)
|
fgwhi | Foreground color white; Natural color definition
CD=NE (*)
|
fgyel | Foreground color yellow; Natural color definition
CD=YE (*)
|
ctres | Foreground color for reverse video;
Natural attribute definition AD=V (*)
|
bgblu | Background color blue |
bggre | Background color green |
bgmag | Background color pink |
bgred | Background color red |
bgcya | Background color turquoise |
bgwhi | Background color white |
bgyel | Background color yellow |
* For detailed information on the Natural definitions
AD
and CD
, see the appropriate
session parameters AD
and
CD
described in the Natural Reference documentation.
Cursor keys can be set in two modes: application mode or normal (numeric) mode. In application mode, the numeric keypad keys are assigned different tasks than when in normal mode.
Name | Description |
---|---|
kd | Cursor key down (in normal mode) |
kl | Cursor key left (in normal mode) |
kr | Cursor key right (in normal mode) |
ku | Cursor key up (in normal mode) |
@7 | Cursor key end |
kh | Cursor key home |
CKNO | Normal cursor key mode |
CKAP | Application cursor key mode |
cm | Cursor motion |
CNL | Cursor next line |
ve | Cursor visible |
vi | Cursor invisible |
DK | Cursor key down (in application mode) |
LK | Cursor key left (in application mode) |
RK | Cursor key right (in application mode) |
UK | Cursor key up (in application mode) |
These fields can be used to describe the terminal entry or to add some comments.
Name | Description |
---|---|
bc | Backspace key |
bcvt | Alternative backspace key |
bt | Backtab key |
cr | Carriage return key |
dc | Delete character key |
KDEL | Delete to end of field key |
ESC | Escape key |
ETO | Escape timeout value in milliseconds |
%1 | Help key |
kI | Insert or overstrike mode key |
NLFF | Next line first field key |
kN | Page down (next) key |
PD | Alternative page down (next) key |
kP | Page up (previous) key |
PU | Alternative page up (previous) key |
&2 | Refresh key |
ta | Tab key |
Keypad | Description |
---|---|
KP01 | Single null |
KP1 | One |
KP2 | Two |
KP3 | Three |
KP4 | Four |
KP5 | Five |
KP6 | Six |
KP7 | Seven |
KP8 | Eight |
KP9 | Nine |
KPADD | Add |
KPSUB | Subtract |
KPDIV | Divide |
KPMUL | Multiply |
KPTS | Thousand separator |
KPDP | Decimal point |
KPRES | Result |
Name | Description |
---|---|
eA | Enable line graphics |
as | Graphics mode on |
ae | Graphics mode off |
G1 | Single upper-right corner character |
GD1 | Double upper-right corner character |
G2 | Single upper-left corner character |
GD2 | Double upper-left corner character |
G3 | Single lower-left corner character |
GD3 | Double lower-left corner character |
G4 | Single lower-right corner character |
GD4 | Double lower-right corner character |
GH | Single horizontal bar character |
GDH | Double horizontal bar character |
GV | Single vertical bar character |
GDV | Double vertical bar character |
Name | Description |
---|---|
bl | Audio bell |
vb | Visual bell |
cl | Clear screen |
ce | Clear to end of line |
ks | Keypad mode application |
ke | Keypad mode numeric |
xi | Scroll glitch |
TCS | External terminal/printer character set, for more information, see Support of Different Character Sets with NATCONV.INI in the Operations documentation. |
tc | Terminal copy |
A name and up to 30 aliases can be defined for each entry.
Key | Description |
---|---|
PA1 | Attention key PA1 |
PA2 | Attention key PA2 |
PA3 | Attention key PA3 |
PF1 | Function key PF1 |
PF2 | Function key PF2 |
... | |
PF47 | Function key PF47 |
PF48 | Function key PF48 |
Name | Description |
---|---|
RTLF | Right-to-left language toggle key for fields |
RTLS | Right-to-left screen toggle key |
Name | Description |
---|---|
mb | Blinking on; Natural attribute definition
AD=B (*)
|
BR | Blinking off |
adc | Cursive/italics on; Natural attribute definition
AD=C (*)
|
adc0 | Cursive/italics off |
md | Intensified (bold) on; Natural attribute
definition AD=I (*)
|
HR | Intensified off |
mr | Reversed on; Natural attribute definition
AD=V (*)
|
mr0 | Reversed off |
us | Underlined on; Natural attribute definition
AD=U (*)
|
ue | Underlined off |
me | Reset attributes; Natural attribute definition
AD=D (*)
|
so | Standout mode on |
se | Standout mode off |
xs | Standout glitch |
* For detailed information on the Natural attribute definition
AD
, see the appropriate session parameter
AD
described in the Natural Reference documentation.
This section lists all terminal capabilities sorted by name. These capabilities correspond to the capabilities in the Search menu.
Name | Description |
---|---|
%1 | Help key |
&2 | Refresh key |
@7 | Cursor key end |
adc | Cursive/italic on; Natural attribute definition
AD=C (*)
|
adc0 | Cursive/italic off |
ae | Graphics mode off |
as | Graphics mode on |
bc | Backspace key |
bcvt | Alternative backspace key |
bgbla | Screen background |
bgblu | Background color blue |
bgcya | Background color turquoise |
bggre | Background color green |
bgmag | Background color pink |
bgred | Background color red |
bgwhi | Background color white |
bgyel | Background color yellow |
bl | Audio bell |
BR | Blinking off |
bt | Backtab key |
ce | Clear to end of line |
CKAP | Application cursor key mode |
CKNO | Normal cursor key mode |
cl | Clear screen |
cm | Cursor motion |
CNL | Cursor next line |
co | Number of screen columns; if not specified, take the current screen size |
cr | Carriage return key |
ct | Color terminal |
ctres | Foreground color for reverse video; Natural
attribute definition AD=V (*)
|
DAR | Dark background, light text |
dc | Delete character key |
DK | Cursor key down (in application mode) |
eA | Enable line graphics |
ESC | Escape key |
ETO | Escape timeout value |
fgblu | Foreground color blue; Natural color definition
CD=BL (*)
|
fgcya | Foreground color turquoise; Natural color
definition CD=TU (*)
|
fggre | Foreground color green; Natural color definition
CD=GR (*)
|
fgmag | Foreground color pink; Natural color definition
CD=PI (*)
|
fgred | Foreground color red; Natural color definition
CD=RE (*)
|
fgwhi | Foreground color white; Natural color definition
CD=NE (*)
|
fgyel | Foreground color yellow; Natural color definition
CD=YE (*)
|
G1 | Single upper-right corner character |
G2 | Single upper-left corner character |
G3 | Single lower-left corner character |
G4 | Single lower-right corner character |
GD1 | Double upper-right corner character |
GD2 | Double upper-left corner character |
GD3 | Double lower-left corner character |
GD4 | Double lower-right corner character |
GDH | Double horizontal bar character |
GDV | Double vertical bar character |
GH | Single horizontal bar character |
GV | Single vertical bar character |
HR | Intensified off |
kd | Cursor key down (in normal mode) |
KDEL | Delete to end of field key |
ke | Keypad mode numeric |
kh | Cursor key home |
kI | Insert or overstrike mode key |
kl | Cursor key left (in normal mode) |
kN | Page down (next) key |
kP | Page up (previous) key |
KP01 | Single zero (0) keypad key |
KP1 | One |
KP2 | Two |
KP3 | Three |
KP4 | Four |
KP5 | Five |
KP6 | Six |
KP7 | Seven |
KP8 | Eight |
KP9 | Nine |
KPADD | Add |
KPDIV | Divide |
KPDP | Decimal point |
KPMUL | Multiply |
KPRES | Result |
KPSUB | Subtract |
KPTS | Thousand separator |
kr | Cursor key right (in normal mode) |
ks | Keypad mode application |
ku | Cursor key up (in normal mode) |
li | Number of screen rows; if not specified, take the current screen size |
LIG | Light background, dark text |
LK | Cursor key left (in application mode) |
mb | Blinking on; Natural attribute definition
AD=B (*)
|
md | Intensified (bold) on; Natural attribute definition
AD=I (*)
|
me | Reset attributes; Natural attribute definition
AD=D (*)
|
mr | Reversed on; Natural attribute definition
AD=V (*)
|
mr0 | Reversed off |
NLFF | Next line first field key |
PA1 | Attention key PA1 |
PA2 | Attention key PA2 |
PA3 | Attention key PA3 |
PD | Alternative page down (next) key |
PF1 | Function key PF1 |
PF2 | Function key PF2 |
... | |
PF47 | Function key PF47 |
PF48 | Function key PF48 |
PU | Alternative page up (previous) key |
RK | Cursor key right (in application mode) |
RTLF | Right-to-left language toggle key for fields |
RTLS | Right-to-left screen toggle key |
se | Standout mode off |
so | Standout mode on |
ta | Tab key |
tc | Terminal copy |
TCS | External terminal/printer character set. |
te | Additional sequence after termination |
TEAC | Application cursor key mode after termination |
TEAK | Application keypad after termination |
TECI | Cursor invisible after termination |
TECL | Clear screen after termination |
TECV | Cursor visible after termination |
TEDB | Dark background after termination |
TELB | Light background after termination |
TENC | Normal cursor key mode after termination |
TENK | Numeric keypad after termination |
TENL | Cursor next to line after termination |
TERA | Reset video attributes after termination |
ti | Additional initialization sequence |
TIAC | Application cursor key mode after initialization |
TIAK | Application keypad after initialization |
TICI | Cursor invisible after initialization |
TICL | Clear screen after initialization |
TICV | Cursor visible after initialization |
TIDB | Dark background after initialization |
TIGR | Enable line graphics after initialization |
TIIM | Insert mode after initialization |
TILB | Light background after initialization |
TINC | Normal cursor key mode after initialization |
TINK | Numeric keypad after initialization |
TIOM | Overstrike mode after initialization |
TIRA | Reset attributes after initialization |
ue | Underlined off |
UK | Cursor key up (in application mode) |
us | Underline on; Natural attribute definition
AD=U (*)
|
vb | Visual bell |
ve | Cursor visible |
vi | Cursor invisible |
xi | Scroll glitch |
xs | Standout glitch |
* For detailed information on the Natural definitions
AD
and CD
, see the appropriate
session parameters AD
and
CD
described in the Natural Reference documentation.