Those Pesky Square Bracket Characters

Most IBM 3270 emulators have some degree of difficulty with the square-bracket characters, [ and ]. The problem is that there is not a consistent definition of what EBCDIC codes represent them.

The Possibilities

Depending on the host OS, mode, and intermediate facilities, the square bracket characters may be displayed as: Note that OS modes can also change how these characters are displayed. For example, the CMS command terminal apl on causes the Graphic Escape (GE) to be used when displaying EBCDIC codes X'BA', X'BB', X'AD' and X'BD', while terminal apl off causes them to be displayed without it.

x3270 Facilities

x3270 has two facilities to deal with this situation: character sets and keymaps. By selecting the correct character set and keymap, you can set up x3270 to generate and display the proper codes for the square-bracket characters.

The default character set is called bracket. The bracket character set implements the 'old hosts' convention listed above. When bracket is used:

Another common character set is called us. This character set implements the IBM "U.S. English" character set: An additional character set is called gebracket. This character set is for hosts that use IBM "U.S. English" character set, but put a GE in front of the EBCDIC codes X'BA' and X'BB' when displaying them: Finally, there is the apl character set and the apl keymap, which are usually used together by specifying the -apl command-line option.  With the -apl option: Here is a table which summarizes the combinations of characters generated and displayed in the various modes.
 
 
keyboard generates
graphic displayed for EBCDIC codes
x3270 Mode
[ key
] key
X'BA'
X'BB'
GE X'BA'
GE X'BB'
X'AD'
X'BD'
GE X'AD'
GE X'BD'
charset bracket (default) X'AD'
X'BD'
Ý
¨
[
]
[
]
charset us
X'BA'
X'BB'
[
]
Ý
¨
[
]
charset gebracket
X'BA'
X'BB'
[
]
[
]
Ý
¨
[
]
-apl
GE X'AD'
GE X'BD'
[
]
Ý
¨
[
]

So, if your display shows one of the graphics above instead of the desired square-bracket characters, you might want to try one of the other modes.