KLIST - format page into columns.

Syntax:

klist [infile]* [option]*
(+|-)Headings (-)         (+|-)Pause (-)
(+|-)Slew (+)             (+|-)Terminal (-)
Banner=banner             Columns=number (2)
Gap=number                Offset=number (0)
Pagelength=number (66)    Slew=number
Tabs=N1,N2,N3...          TopLine=line
Verticaltabs=L1,L2,L3...  indeX=file
lineWidth=size (136)      (+|-)SeparateFiles (-)

Options:

infile
may be any text file, including files with vertical tabs, reverse linefeeds, etc. according to the proposed ANSI standards for cursor control.
indeX=file
takes input file names from the given index file. The index "file" is a text file that contains file names, one file name per line. KLIST formats and outputs the contents of each file named in the index file.
Banner=banner
provides a banner for the SLIST output.
Columns=number
formats the output into the given number of columns. With +Terminal, the default is one; otherwise, the default is two.
Gap=number
sets the gap between columns. The default is lineWidth/8/Columns.
+Headings
uses the +Headings option when KLIST calls SLIST. +Headings implies Pagelength=50.
lineWidth=size
sets the number of characters in an output line. The default is 136.
Offset=number
offsets output from the left margin by the given number of spaces.
Pagelength=nn
specifies the number of lines on an output page. The default value is 66 (but see the descriptions of +Headings and +Terminal for differences).
+Pause
pauses after each page and waits for you to type a carriage return. +Pause implies +Terminal.
+SeparateFiles
starts a new physical page for each new input file. Normally, KLIST only starts a new logical page, which means that the new file may only start in a new column, not a new page.
-Slew
replaces form-feed characters with line-feeds.
Slew=number
replaces form-feeds with the given number of line-feeds.
Tabs=N1,N2,N3...
sets tabs at positions N1, N2, N3... KLIST calculates the difference between the last two given values and uses that as the interval for all later tab settings. For example,
t=5,10,20

sets tabs in positions 5, 10, and every ten columns thereafter. The default is to set tabs every four columns.

+Terminal
sends the output to the terminal rather than invoking SLIST to send it to the printer. It also sets the default line width to 80, the column count to 1, and the pagelength to 20.
TopLine=line
starts each new page of output on the given line number. The default value is one (first line of the page).
Verticaltabs=L1,L2,L3...
sets vertical tab stops at the specified lines. Vertical tabs are set at the line positions L1, L2, L3, ... KLIST calculates the difference between the last two given values and uses that as the interval for all later vertical tab stops.

Description:

KLIST gathers input and formats it internally one output page at a time. If the output is not redirected and the +Terminal option is not specified, KLIST writes its output into a temporary file which is automatically printed on the line printer using SLIST (see "expl slist").

KLIST places characters on the output page under the control of a cursor. Moving a character to the output page moves the cursor one position to the right unless the character is an ANSI X3.64 control character or escape sequence. The table below summarizes the control characters and escape sequences.

Name  Octal Value  Operation
BS        010      Cursor one position to the left
HT        011      Cursor to next horizontal tab stop
LF        012      Cursor down one line and to left margin
VT        013      Cursor to left margin and next vertical
                   tab stop
FF        014      Cursor to top of next column
CR        015      Cursor to left margin
SYN       026      Cursor to top left of next physical page
EM        031      Cursor to left margin and top of same
                   page (home)
ESC D   033 104    Cursor down one line
ESC E   033 105    Cursor down one line and to left margin
ESC H   033 110    Set a horizontal tab at cursor
ESC J   033 112    Set a vertical tab at cursor

More complex ANSI escape sequences are described in the following table. These all begin with the "ESC [" construct. Items shown inside square brackets (as in [nn]) are optional.

Name               Operation
ESC [ [nn] A       Cursor up <nn> lines
ESC [ [nn] B       Cursor down <nn> lines
ESC [ [nn] C       Cursor <nn> positions right
ESC [ [nn] D       Cursor <nn> positions left
ESC [ [nn] E       Cursor down <nn> lines and to left margin
ESC [ [nn] F       Cursor up <nn> lines and to left margin
ESC [ [nn] G       Cursor to character position <nn>
ESC [ [nn][;mm] H  Cursor to line <nn> position <mm>
ESC [ [nn] I       Cursor <nn> tab stops right
ESC [ U            Cursor to top of next column
ESC [ V            Cursor to top of previous column
ESC [ [nn][;nn]* W <nn> = 0, Set horizontal tab at cursor
                   <nn> = 1, Set vertical tab at cursor
                   <nn> = 2, Clear horizontal tab at cursor
                   <nn> = 3, Clear vertical tab at cursor
                   <nn> = 5, Clear all horizontal tabs
                   <nn> = 6, Clear all vertical tabs
                   <nn> defaults to 0
ESC [ [nn] Y       Cursor <nn> tab stops down
ESC [ [nn] Z       Cursor <nn> tab stops left
ESC [ [nn] a       Cursor <nn> positions right
ESC [ [nn] d       Cursor to line <nn>
ESC [ [nn] e       Cursor down <nn> lines
ESC [ [nn][;mm] f  Cursor to line <nn> position <mm>
ESC [ [nn][;nn]* g <nn> = 0, Clear horizontal tab at cursor
                   <nn> = 1, Clear vertical tab at cursor
                   <nn> = 3, Clear all horizontal tabs
                   <nn> = 4, Clear all vertical tabs
                   <nn> defaults to 0
ESC [ [nn] ~       Cursor to column <nn>

Notes:

See Also:

expl slist
for details on printing files from TSS.

Files Used:

fc*kl - if output is to be SLISTed.

Copyright © 1996, Thinkage Ltd.