man — Display sections of the online reference manual
Format
- man [–wx] [–M path] [section] entry …
- man –k [–M path] keyword …
Description
man displays help information about both shell commands and the z/OS® UNIX set of TSO/E commands. You can use it to search help files having the specified keywords associated with them.
Options
- –k
- Searches a precomputed database of syntax lines for information about keywords.
- –M path
- Searches the directories indicated by path for help files. If –M is not specified, man uses the path specified in the MANPATH environment variable if set; otherwise man searches /usr/man/%L. The value of the LANG environment variable is substituted for %L in this directory and in the directories specified by MANPATH. All help files are found by searching similarly structured file trees rooted at one or more places. See Files for a description of what files and directories man should find in each directory that it searches.
- –w
- Displays only the filename of the file containing the help file.
- –x
- Displays what files man is searching to find the help file. –x also displays any errors that man encounters while extracting man pages from online book files. See BookServer exit values.
- section
- Is a number (0–9) representing a section of the online help.
When you specify a section number, man searches
only that section for entry, instead of searching all sections. The
online help available for z/OS UNIX contains
one section:
1 Commands
To find a given entry, man checks each directory in MANPATH for a file with a specific name. For each section number requested, man searches MANPATH for the following files in this order:
- catn/entry.n in each directory in MANPATH.
- mann/*.stfp in each directory in MANPATH.
- mann/*.book in each directory in MANPATH.
- mann/entry.n in each directory in MANPATH.
If no section number is specified then man searches all sections in order from 1 to 9, then 0. The first entry found by man is the one displayed.
pg –e –p '(Page %d)'
If you are running in a double-byte locale, set MANPAGER or PAGER to invoke a command which supports double-byte characters, such as the more command. pg does not support double-byte characters.
Examples
man –k compare
man tsomount
man dbxalias
The same applies
for the pdbx subcommands. For example, enter: man pdbxcont
to
display information about the cont subcommand.man lsF
man tcshat
Environment variables
- MANPATH
- Contains a list of paths to search for man pages.
- MANPAGER, PAGER
- Contains
an output filtering command for use when displaying man pages on a
terminal.
If you are running in a double-byte locale, verify that this variable is set to a command which supports double-byte characters, such as the more command.
- TMPDIR
- Identifies the directory where temporary files reside.
Localization
- LANG
- LC_ALL
- LC_CTYPE
- LC_MESSAGES
- NLSPATH
See Localization for more information.
Files
- /usr/man/%L/man[0-9]/*.stfpt
- Single-tagged preformatted plain text file that contains man pages.
- /usr/man/%L/man[0–9]/*.book
- BookManager® book files containing man pages.
- /usr/man/%L/cat[0–9]/ * .[0–9]
- Subdirectories containing formatted help files.
- /usr/man/%L/whatis
- Database used by –k option.
Exit values
- 0
- Topic not found.
- 1
- Topic contents exceeded the buffer length.
- -1
- No errors.
BookServer exit values
If the -x option was specified and man encounters errors while extracting man pages from online book files, these exit values are displayed.
- 112105
- The bookread component of BookServer could not locate or read the partitioned dataset of the code page translation tables. Check the bookread configuration as described in the z/OS program directory and the BookServer program directory.
- 100000-199999
- An error occurred while opening the bookread session.
- 200000-299999
- An error occurred while opening the book.
- 300000-399999
- An error occurred while translating the topicid to unicode.
- 400000-499999
- An error occurred while positioning to the topic within the book file.
- 500000-599999
- An error occurred while reading a line of the topic.
- 600000-699999
- An error occurred while translating the text of the book from the internal book code page to the display code page errors.
- 700000-799999
- An error occurred while closing the book file.
- 800000-899999
- An error occurred while closing the session.
- 900000-999999
- An error occurred while positioning to the top of the book file.
- 1000000-1099999
- An error occurred while looking up the CONTENTS topic ID.
Portability
POSIX.2 User Portability Extension, X/Open Portability Guide, UNIX systems.
The elements of the environment variable MANPATH are separated by colons.
The –M option, the –x option, the –w option, the MANPAGER environment variable, the default pager, and the ability to specify section on the command line are all extensions to the POSIX standard.
Related information
help, more