UFH Introduction
USP's ufh capability was invented by Martin L. Smith in 1991. This user's guide is a paraphrase of Martin's original which was first published in 1992. If you have any questions about the language implementation or features and your local USP guru can't help, feel free to contact Martin at:
ufh reads data in USP format from stdin and writes data in USP format to stdout. In between it reads a control script, compiles the script and operates on the datastream that is passing through. The syntax for execution is:
for disk file file access or
USP process | ufh ufh_script | USP process
for pipe usage. ufh scripts are made up of a user selected set of the following functions:
A very simple script to count the number of records and traces in a USP dataset would look like:
func Begin() /* initialize a couple of counters */
{
RecNum = 1;
Traces = 1;
}
func OnLineHeader() /* read and output the line header */
{
output(LH);
}
Note the C like syntax. If you are not a programmer do not let this scare you. We have a large archive of ufh scripts that have been used over the years. A cursory examination of any of these will make it pretty obvious how to use the tool.
It is not necessary to use all functions in the script. For instance if you do not need to initialize anything and do not which to see any post processing reporting you could skip the Begin and End functions.