ubmlp prompts the user to select a printer from a list of available printers and then executes command piping its output to the selected print spool service.
The list of available printers is held in the file $UBDIR/printers/list (normally /usr/lib/ub/printers/list). The format of this file is a ubitem list where the return value is the printer spool command the display is a description of the printer.
ubln link a UNIBASE table (“.dat” and “.key”files) to a target name, table1 and target can not be the same.
If target is not a directory, then only one table may be specified before it. ubln links “.dat” and “.key” of table1 to “.dat” and “.key” of target. If “.dat” and “.key” of target exists and its mode forbids writing, the mode is printed and the user is asked for a response. If the response begins with a ‘y'(and the user is permitted) then the link occurs.
If the target is a directory then the specified “.dat” and “.key” of table1 are linked to that directory. That is,”.dat” and “.key” files with the same names are created in the directory linked to the specified “.dat” and “.key” files.
<P> <h2>EXAMPLE</h2> To link the “.dat” and “.key” files of the table “stock” to the table “stk”: <P><PRE>ubln stock stk</PRE> <P> <h2>SEE ALSO</h2> ln(1) Unix Reference Manual
ubitem displays a list of text items on a formatted screen. The first item is highlighted and the highlighting can be moved up and down the list by using the arrow keys. The highlighted item can be selected (indicated by a `*’) or deselected by pressing the AB key. Pressing one of the programed FUNCTION KEYS will execute a predetermined script for each item.
F1 (SEARCH) can be used to find an entry by entering a string. EXIT can be used to exit without doing anything.
Pressing RETURN will execute the first defined function key with the currently selected list.
If no items are selected when a function key or RETURN is pressed, the currently highlighted record will be automatically selected.
The list of items to choose from can be a file, output from a unix command, read from standard input, or text values stored in the command file.
Depending on the configuration single or multiple selections may be made.
A selection list consists of lines of text. Each line has one or two parts. A return value and a display value. If there is only one part then it is used for both display and return. The two parts of each line are separated by a ‘:’. This may be changed – see command line options below.
When a script is executed, the return values of the selected items are passed as arguments to the script.
After reading the selection list, ubitem displays some (or all depending on screen size) of the list with the first item highlighted. The user can use the arrow keys to move the highlighting up or down the list. The list will scroll as appropriate.
The format for file, the control file, can be found in item(4).
FLAGS
FLAG
DESCRIPTION
CONTENTS
DETAILS
-C
control file
text file name
security control file for menus. See menu(4) for details.
-E
disable EXIT key
-F
file
text file name
Name of file containing list of items
-S
read the selection list from standard input
-d
debug output. Echo each line as it is read
-f
separator
character
Use separator to separate the return value from the display value. The default value is `:’.
ERRORS
EXAMPLE
To run the item list program select.itm
ubitem select
To select a user from the passwd file (using user.itm)
awk '{print $1":"$5}' /etc/passwd | ubitem -S user
This utility is similar to nroff but much simpler. Its advantages are that it is small and fast and by using command line options it can format small amounts of text without using dot commands. This is particularly useful for the vi “!” command. e.g. To centre 2 lines and justify the rest of a marked text section in 6O character wide lines use the following keystrokes in vi:
!.+2 ubformat -c2-w6O
The actions of ubformat can be controlled by a simple set of ‘.’ (dot) commands. Unless otherwise directed, ubformat will justify paragraphs to lines 6O characters long. Dot commands are lines in the text that start with a ‘.’.
<P> <TABLE WIDTH=”100%” BGCOLOR=”#000000″> <CAPTION>DOT COMMANDS</CAPTION> <TR><TD> <TABLE WIDTH=”100%” BGCOLOR=”#FFFFFF”> <TR> <TH>COMMAND</TH> <TH>DESCRIPTION</TH> </TR> <TR> <TD>bl n</TD> <TD>print n blank lines (*line spacing)</TD> </TR> <TR> <TD>br</TD> <TD>break to a new line</TD> </TR> <TR> <TD>ce n</TD> <TD>centre next n lines</TD> </TR> <TR> <TD>fi</TD> <TD>start filling output</TD> </TR> <TR> <TD>fo n</TD> <TD>next n lines are footer</TD> </TR> <TR> <TD>in n</TD> <TD>indent n characters</TD> </TR> <TR> <TD>he n</TD> <TD>next n lines are header</TD> </TR> <TR> <TD>lb n t</TD> <TD>label at column n with text t</TD> </TR> <TR> <TD>ll n</TD> <TD>line lenth n characters</TD> </TR> <TR> <TD>ma xx</TD> <TD>define macro xx</TD> </TR> <TR> <TD>me</TD> <TD>end macro definition</TD> </TR> <TR> <TD>nf</TD> <TD>stop filling output</TD> </TR> <TR> <TD>np</TD> <TD>new page</TD> </TR> <TR> <TD>pa</TD> <TD>new paragraph</TD> </TR> <TR> <TD>pc t</TD> <TD>printer characteristic</TD> </TR> <TR> <TD>pn n</TD> <TD>set page number to n</TD> </TR> <TR> <TD>re f</TD> <TD>read input from file f</TD> </TR> <TR> <TD>sp n</TD> <TD>set line spacing to n</TD> </TR> </TABLE> </TD></TR> </TABLE> <P> <TABLE WIDTH=”100%” BGCOLOR=”#000000″> <CAPTION>COMMAND LINE OPTIONS</CAPTION> <TR><TD> <TABLE WIDTH=”100%” BGCOLOR=”#FFFFFF”> <TR> <TH>OPTION</TH> <TH>DESCRIPTION</TH> </TR> <TR> <TD>-c number</TD> <TD>Centre the next number of text lines.</TD> </TR> <TR> <TD>-I characters</TD> <TD>characters is characters to be ignored/placed at the beginning of each line.</TD> </TR> <TR> <TD>-o number</TD> <TD>Offset number characters from left margin.</TD> </TR> <TR> <TD>-w width</TD> <TD>Set the width of a line to width character position (default is 6O).</TD> </TR> <TR> <TD>-number</TD> <TD>Set the length of a page to number lines (default is 66).</TD> </TR> </TABLE> </TD></TR> </TABLE> <P> <h2>EXAMPLE</h2> To centre lines which start with a ‘#’ character <PRE>ubformat -c2 -I# filename</PRE>
ubform is used to overlay a form onto a report (such as an order form or table). The overlay form is given by the -f flag. The report can be in a file or if none is given then standard input is read.
ubform understands attribute specifications where a line ending in “@@” is followed by an attribute line. These two lines are counted as one and the attribute line is passed through unchanged. ubform also passes through “.” commands (i.e. lines starting with “.”) unchanged.
Another filter such as ubprint (1) is required to produce actual printer output.
<P> <TABLE WIDTH=”100%” BGCOLOR=”#000000″> <CAPTION>COMMAND LINE OPTIONS</CAPTION> <TR><TD> <TABLE WIDTH=”100%” BGCOLOR=”#FFFFFF”> <TR> <TH>OPTION</TH> <TH>DESCRIPTION</TH> </TR> <TR> <TD>-d</TD> <TD>debug output</TD> </TR> <TR> <TD>-f file</TD> <TD>name of file to overlay on form. If not given standard input is used.</TD> </TR> <TR> <TD>-o offset</TD> <TD>output offset offset spaces from left margin</TD> </TR> <TR> <TD>form</TD> <TD>Name of the form to overlay with the file.</TD> </TR> </TABLE> </TD></TR> </TABLE> <P> N.B. There is no default extension for forms. <P> <h2>EXAMPLE</h2> ubreport purch/ubform -o 1O purchorder/ubprint -p hplaser Ip <P> <h2>SEE ALSO</h2> form(4) ubprint(1) printers(4)
ubcheck – exhaustively check UNIBASE tables for structure errors
SYNOPSIS
ubcheck <directory> {<application>} {<table>}
DESCRIPTION
ubcheck will exhaustively check every UNIBASE table in a directory for errors.
Any errors are logged in a file called filecheck in the data directory. An existing filecheck is removed before the testing begins.
As ubcheck is exhaustive it can take a long time and is best run as an overnight process.
NB. The UNIBASE isam routines are very robust and tables are not normally corrupted except by machine failures which are usually detected by a redundancy check everytime a table is opened. This utility simply provides an extra level of assurance.
<P> <TABLE WIDTH=”100%” BGCOLOR=”#000000″> <CAPTION>COMMAND LINE OPTIONS</CAPTION> <TR><TD> <TABLE WIDTH=”100%” BGCOLOR=”#FFFFFF”> <TR> <TH>OPTION</TH> <TH>DESCRIPTION</TH> </TR> <TR> <TD><directory></TD> <TD>directory to be tested</TD> </TR> <TR> <TD><application></TD> <TD>Optional data dictionary (default dict.dat) to use for test</TD> </TR> <TR> <TD><table></TD> <TD>Optional table if only one table, rather than all tables, is to be tested.</TD> </TR> </TABLE> </TD></TR> </TABLE> <P> <h2>EXAMPLE</h2> <PRE>ubcheck /data/stock /usr/app/stock_sys/dct/dict.dat stock</PRE>