1.\" Copyright (c) 1986, 1990, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" %sccs.include.redist.roff% 5.\" 6.\" @(#)mset.1 8.1 (Berkeley) 06/06/93 7.\" 8.Dd 9.Dt MSET 1 10.Os BSD 4.3 11.Sh NAME 12.Nm mset 13.Nd retrieve 14.Tn ASCII 15to 16.Tn IBM 173270 keyboard map 18.Sh SYNOPSIS 19.Nm mset 20.Op Fl picky 21.Op Fl shell 22.Op Ar keyboardname 23.Sh DESCRIPTION 24.Nm Mset 25retrieves mapping information 26for the 27.Tn ASCII 28keyboard to 29.Tn IBM 303270 terminal 31special functions. 32Normally, these mappings are found 33in 34.Pa /usr/share/misc/map3270 35(see 36.Xr map3270 5 ) . 37This information is used by the 38.Xr tn3270 39command (see 40.Xr tn3270 1 ) . 41.Pp 42The default 43.Nm mset 44output can be used to store the mapping information in the process environment 45in order to avoid scanning 46.Nm map3270 47each time 48.Nm tn3270 49is invoked. 50To do this, place the following command in your 51.Pa .login 52file: 53.Bd -literal -offset indent 54set noglob; setenv MAP3270 "\(gamset\(ga"; unset noglob 55.Ed 56.Pp 57If the 58.Ar keyboardname 59argument is not supplied, 60.Nm mset 61attempts to determine the name of the keyboard the user is using, 62by checking the 63.Ev KEYBD 64environment variable. 65If the 66.Ev KEYBD 67environment variable is not set, then 68.Nm mset 69uses the user's terminal type from the environment variable 70.Ev TERM 71as the keyboard name. 72Normally, 73.Nm mset 74then uses the file 75.Xr map3270 5 76to find the keyboard mapping for that terminal. 77However, if the environment variable 78.Ev MAP3270 79exists and contains the entry for the specified keyboard, then that 80definition is used. 81If the value of 82.Ev MAP3270 83begins with a slash (`/') then it is assumed to be the full pathname 84of an alternate mapping file and that file is searched first. 85In any case, if the mapping for the keyboard is not found in 86the environment, nor in an alternate map file, nor in the standard map file, 87then the same search is performed for an entry for a keyboard with the name 88.Ar unknown . 89If that search also fails, 90then a default mapping 91is used. 92.Pp 93The arguments to 94.Nm mset 95are: 96.Pp 97.Bl -tag -width Fl 98.It Fl picky 99When processing the various 100.Pa map3270 101entries (for the user's keyboard, 102and all those encountered before the one for the user's keyboard), 103.Nm mset 104normally will not complain about entries for unknown functions (like 105.Dq PFX1 ; 106the 107.Fl picky 108argument causes 109.Nm mset 110to issue warning messages about these unknown entries. 111.It Fl shell 112If the 113.Pa map3270 114entry is longer than the shell's 1024 environmental variable 115length limit, the default 116.Nm mset 117output cannot be used to store the mapping information in the process 118environment to avoid scanning 119.Pa map3270 120each time 121.Nm tn3270 122is invoked. 123The 124.Fl shell 125argument causes 126.Nm mset 127to generate shell commands to set the environmental variables 128.Ev MAP3270 , 129.Ev MAP3270A , 130and so on, breaking up the entry to fit within the shell environmental 131variable length limit. 132To set these variables, place the following command in your 133.Pa .login 134file: 135.Bd -literal -offset indent 136mset -shell > tmp ; source tmp ; /bin/rm tmp 137.Ed 138.It Ar keyboardname 139When searching for the 140.Pa map3270 141entry that matches the user's keyboard, 142.Nm mset 143will use 144.Ar keyboardname 145instead of determining the keyboard name from the 146.Ev KEYBD 147or 148.Ev TERM 149environmental variables. 150.Sh FILES 151.Bl -tag -width /usr/share/misc/map3270 -compact 152.It Pa /usr/share/misc/map3270 153keyboard mapping for known keyboards 154.El 155.Sh SEE ALSO 156.Xr tn3270 1 , 157.Xr map3270 5 158.Sh HISTORY 159The 160.Nm mset 161command appeared in 162.Bx 4.3 . 163