The 3270 terminal operates a little differently from command line interfaces you may be used to on Unix or Windows. This article will go over the basics of using the 3270 (via an emulator) and how the device is supported in MTS.
One of the most important differences is that normally the terminal operates in line mode - the host system will not receive any input until you send the line by pressing
A very small number of programs on MTS support binary mode, where each key is processed as it is pressed - an example is the editor in visual mode. (Update: see Jeff Ogden's comment below for a more precise description of how the terminal interacts with the operating system.)
As well as the regular alphanumerical keys the 3270 has a number of special keys used by MTS. On an emulated terminal there is normally a way to bring up a keypad with these keys - above is the keypad on the x3270 emulator. Depending on the emulator there are also keyboard shortcuts, eg
Clear on x3270.
PA1sends an attention interrupt that will normally make a program stop what it is doing, similar to
PA2sends an end of file or cancel signal, similar to
Ctrl-Don Unix and
Clearwill refresh the screen. This is especially useful when you disconnect a terminal session then reconnect.
PFkeys act as soft function keys
You can send special device commands to the display driver. These can normally be entered at any time, not just at the
# prompt. Device commands all start with a
% and can be abbreviated like MTS commands. Note that device commands will not appear in the terminal history after you press
%? will display the current terminal settings with output similar to the below.
Roll mode Rate=5 Duplex=on Width=078 Timeout=off Dcc="%" Keyboard=lc Hex=off "'" Buffer=04 Tabs=off "?" PA1 = attention interrupt PA2 (CNCL) = end of file CLEAR = refresh screen SYS REQ = pause / continue PF1 =%Wb=* PF2 =$Copy *msource*@sp * PF3 =%? PF4 =%Wf=* PF5 =%Mode=page PF6 =%Enter PF7 =%Wf PF8 =%Mode=line PF9 =%Mode=roll PF10=%Wl PF11=%Wl=60 PF12=%Wr=60 PF13=%Wb=* PF14=$Copy *msource*@sp * PF15=%? PF16=%Wf=* PF17=%Mode=page PF18=%Enter PF19=%Wf PF20=%Mode=line PF21=%Mode=roll PF22=%Wl PF23=%Wl=60 PF24=%Wr=60
The output of
%? will list the current function keys. You can redefine these with
%PFn cmd, so for example if you wanted
PF2 to display file information using the
$filestatus command you could enter
Note that you do not need to press
Enter after using a function key.
The mode determines how the screen will display output when there is more than one screen of text. Available modes area:
%rollwhere the screen will scroll up slowly when the bottom of the page is reached. This is the default mode.
%lineis similar to roll but the screen will be cleared, previous output moved up and further output starts from the middle.
%fastwhere the whole output is displayed quickly with no scrolling or pausing.
%pagewhere a page of output is displayed at a time. To move to the next page you press the
Attnkey - however I have not got those keys to work, at least on x3270; instead I redefined PF3 to act as the pause/continue key using
You can adjust the rate of scrolling with
%rate N where N is a number between 1 (slowest) and 9 (fastest), default being 5.
You can scroll the display backwards and forwards using
%wf; these are conveniently bound to
Other useful commands
%activitywill display the current task's status and resource utilisation.
%grabwill start a second command session using the same terminal. You can then switch between the two sessions by using
%quitwill force a disconnect - useful if your session has crashed.
%resetwill return all device settings you have changed back to their defaults.
%timeout offwill prevent your terminal from being logged out after 30 minutes of inactivity.
See the 3270 chapter in MTS Volume 4: Terminals and Networks in MTS on the MTS Archive for a full description of how to use the terminal and other device commands.
Note that the operator's console uses a different set of device commands; see the Operator's Manual for more details.