FILE FORMATS

Table of Contents

  1. NAME
  2. DESCRIPTION
  3. SYNTAX
  4. DEFINITIONS
  5. INTERPRETER
  6. COMMAND FILE FORMATS

NAME

intro – introduction to UNIBASE command file format

DESCRIPTION

This section outlines the formats of UNIBASE Data Dictionary and various screen and command files. These files are normal text files with Data Dictionary named as dict.dat, and command files are files whose names end with

SYNTAX

A formal syntax is used to describe each section.

DEFINITIONS

< >Surround a definition. The term is defined elsewhere.
{ }The enclosed definition is optional.
|Used to separate alternative values.
The definition above maybe repeated as required.
::=Is defined as

INTERPRETER

Some (in fact most) versions of Unix provide a facility for putting the name of the interpreter to use to execute a script in the first line of the script. The UNIBASE programs ubform, ubitem, ubmenu, ubmulti, ubprompt and ubreport support this syntax.

To use this facility, the first line of the format file must start with #! followed by the name of the interpreter and be followed by a blank line. e.g. a report format might start with

#!/usr/bin/ubreport

Note that the full path name of the interpreter must be given.

Finally the format file must be executable (chmod +x <format> – UNIGEN will maintain this for you) and its path must be in the search path – environment variable PATH.

The advantages of using this approach are quicker start and fewer processes. The disadvantage is that there are many more (possible hundreds) of extra programs in the program search path. Alternatively use absolute path names to execute programs.

eg. ubreport /usr/app/payroll/rep/types

and

/usr/app/payroll/rep/types.rep

are equivalent if #! is used.

Note that in the direct execution the .rep extension is given whereas it is not given if calling ubreport.

COMMAND FILE FORMATS