.\" Copyright (c) 1986, 1990 The Regents of the University of California. .\" All rights reserved. .\" .\" %sccs.include.redist.man% .\" .\" @(#)mset.1 4.3 (Berkeley) 06/11/90 .\" .Dd .Dt MSET 1 .Os BSD 4.3 .Sh NAME .Nm mset .Nd retrieve ASCII to IBM 3270 keyboard map .Sh SYNOPSIS .Nm mset .Op Fl picky .Op Fl shell .Op Ar keyboardname .Sh DESCRIPTION .Nm Mset retrieves mapping information for the ASCII keyboard to IBM 3270 terminal special functions. Normally, these mappings are found in .Pa /usr/share/misc/map3270 (see .Xr map3270 5 ) . This information is used by the .Xr tn3270 command (see .Xr tn3270 1 ) . .Pp The default .Nm mset output can be used to store the mapping information in the process environment in order to avoid scanning .Nm map3270 each time .Nm tn3270 is invoked. To do this, place the following command in your .Pa .login file: .Pp .Dl set noglob; setenv MAP3270 "\(gamset\(ga"; unset noglob .Pp If the .Ar keyboardname argument is not supplied, .Nm mset attempts to determine the name of the keyboard the user is using, by checking the .Ev KEYBD environment variable. If the .Ev KEYBD environment variable is not set, then .Nm mset uses the user's terminal type from the environment variable .Ev TERM as the keyboard name. Normally, .Nm mset then uses the file .Xr map3270 5 to find the keyboard mapping for that terminal. However, if the environment variable .Ev MAP3270 exists and contains the entry for the specified keyboard, then that definition is used. If the value of .Ev MAP3270 begins with a slash (`/') then it is assumed to be the full pathname of an alternate mapping file and that file is searched first. In any case, if the mapping for the keyboard is not found in the environment, nor in an alternate map file, nor in the standard map file, then the same search is performed for an entry for a keyboard with the name .Ar unknown . If that search also fails, then a default mapping is used. .Pp The arguments to .Nm mset are: .Pp .Tw Fl .Tp Fl picky When processing the various .Pa map3270 entries (for the user's keyboard, and all those encountered before the one for the user's keyboard), .Nm mset normally will not complain about entries for unknown functions (like .Dq PFX1 ; the .Fl picky argument causes .Nm mset to issue warning messages about these unknown entries. .Tp Fl shell If the .Pa map3270 entry is longer than the shell's 1024 environmental variable length limit, the default .Nm mset output cannot be used to store the mapping information in the process environment to avoid scanning .Pa map3270 each time .Nm tn3270 is invoked. The .Fl shell argument causes .Nm mset to generate shell commands to set the environmental variables .Ev MAP3270 , .Ev MAP3270A , and so on, breaking up the entry to fit within the shell environmental variable length limit. To set these variables, place the following command in your .Pa .login file: .Pp .Dl mset -shell > tmp ; source tmp ; /bin/rm tmp .Tp Ar keyboardname When searching for the .Pa map3270 entry that matches the user's keyboard, .Nm mset will use .Ar keyboardname instead of determining the keyboard name from the .Ev KEYBD or .Ev TERM environmental variables. .Sh FILES .Dw /usr/share/misc/map3270 .Di L .Dp Pa /usr/share/misc/map3270 keyboard mapping for known keyboards .Dp .Sh ENVIRONMENT .Sh SEE ALSO .Xr tn3270 1 , .Xr map3270 5 .Sh HISTORY .Nm mset appeared in 4.3 BSD.