Using the 3270 terminal

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.

Line mode

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

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

Special keys

3270 keys

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 Alt-C invokes Clear on x3270.

Device Commands

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

%? 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          

Function keys

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

%pf2 $filestatus

Note that you do not need to press Enter after using a function key.

Scrolling

The mode determines how the screen will display output when there is more than one screen of text. Available modes area:

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 %wb and %wf; these are conveniently bound to PF1 and PF4.

Other useful commands

More information

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.

Comments

comments powered by Disqus