Documented in Volume 1 of the UNIX Programmers Manual.
See also stty, reset and termcap
This example is from a .login (see the example for login):
set noglob; eval `tset -s ?h19`
set noglob disables filename substitution, the tset command is
run and the output is placed in a string between the back-quotes.
This is then taken via the eval command as input to the shell.
The ? before the h19 means that the tset command will prompt
the user for terminal type. The default will be h19.
The result of all of this is that the terminal name h19 is used
to initialize the environment variables TERM and TERMCAP. This
is important so that full screen editors, and other commands
work correctly.