This document serves as an introduction to the various file formats employed by UNIBASE, a powerful database system. It details the structure of the crucial Data Dictionary file (dict.dat
) as well as the conventions for different types of screen and command files, all of which are stored as plain text. Understanding these formats, including table definitions (.dct
), menus (.men
), forms (.prm
), reports (.rep
), and screens (.scn
), is essential for effectively interacting with and developing applications within the UNIBASE environment. Furthermore, this overview explains how UNIBASE leverages the Unix/Linux interpreter directive (#!
) for script execution, offering insights into efficient program invocation. Finally, it provides a roadmap to subsequent sections that delve into the specific syntax and structure of each command file format.
Table of Contents
- NAME
- DESCRIPTION
- SYNTAX
- DEFINITIONS
- INTERPRETER
- COMMAND FILE FORMATS
NAME
intro – introduction to UNIBASE command file format
DESCRIPTION
This section outlines the formats of the UNIBASE Data Dictionary and various screen and command files. These are normal text files. The Data Dictionary file is named dict.dat, and command files use names that end with the listed extensions.
- .dct – table definitions – combined to make dict.dat
- .men – menus
- .prm – forms or prompts
- .rep – reports
- .scn – screens
SYNTAX
A formal syntax describes 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
Unix and Linux 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. In fact all executable programs support this feature.
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 you must specify the full path name of the interpreter.
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 direct execution, you provide the .rep extension, but you omit it when calling ubreport.