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