emp4init new_dbEmpress responds with the following messages:
Creating Database 'new_db'
Importing 4GL Tables
IMPORT V6.0
Copyright Empress Software Inc. 1983, 2006
sys_4gl_application
sys_4gl_compile
sys_4gl_domain
sys_4gl_field
sys_4gl_form
sys_4gl_key
sys_4gl_link
sys_4gl_script
sys_4gl_window
sys_ag_attribute
sys_ag_definition
sys_ag_function
sys_ag_menu
sys_ag_menu_item
sys_ag_parameter
sys_ag_qual_list
sys_ag_qualification
sys_ag_screen
sys_ag_screen_attr
sys_ag_table
sys_attr_privs
sys_attrssys_dictionary
sys_privssys_tables
3.2 The Terminal Definition
When Empress 4GL is started, the Empress variable
MSTERM is read so that it knows what type of terminal is being used. If
MSTERM is not set, then the system environment variable TERM is used. Then
information on that terminal type is obtained from the terminal definition
termdb database, which by default resides in the Empress
4GL directory.
To obtain a list of terminal names and their descriptions that termdb contains, run the following command:
emp4termIt will display the location of the terminal database, a sorted list of terminal names and their descriptions.
An Empress 4GL application called sys_terminal can be used to add a new terminal definition or update the existing one. To invoke the sys_terminal application, type:
emp4gl termdb sys_terminalwhere:
| termdb | is the termdb database. |
emp4ctdb termdbwhere:
| termdb | is the termdb database. |
The termdb database and the sys_terminal application are more thoroughly discussed in a subsequent chapter.
setenv MSTERM sun4.xtermThe default font used by Empress 4GL is usually 6x13 or 8x13. If that font is not available on your system, or if you would like to use another one, check the available fonts by listing the files in the directory named by the UNIX environment variable FONTPATH. Select a fixed font, i.e., one which does not use proportional spacing, and set the MS4GLFONTNAME variable to that font. For example:
setenv MS4GLFONTNAME courierWhen Empress 4GL is started, another window will be opened to run the 4GL process. If any errors are encountered when Empress 4GL is invoked, for example, if ASCII characters appear on the screen, the -g flag should be used:
emp4gl -g databasewhere:
| database | is the name of the database. |
3.4 Printing an Application
In an application, the scripts, key contexts, window definitions, field
definitions etc., are stored in several tables. To print out all these
definitions in a single source, Empress provides a utility
called emp4prt. It takes the name of the database and the application
as arguments:
emp4prt database applicationwhere:
| database | is the name of the database. |
| application | is the name of the application. |
The output of this command can be redirected to a file.
empclrlk -4gl database applicationwhere:
| database | is the name of the database. |
| application | is the name of the application. |
Warning
Use the command empclrlk only when no one else is using Empress 4GL.
Building a customized executable has several advantages:
emp4bldx(There are several options to this command that are described in the "Manual Pages" of this manual.) The Empress 4GL Executable Builder will prompt the user to enter a name for the customized executable to be built in the user's current working directory.
Enter name of executable: exec1The user is then prompted to enter the names of terminal definitions to be linked to the executable.
Enter name of terminal: vt100
Enter name of terminal: vt220
Enter name of terminal:(A <Return> by itself is used to tell the Empress 4GL Executable Builder that you are finished entering data.) The user is then prompted to enter the name of a database followed by names of linked applications from that database to be linked to the executable.
Enter name of database: userdb
Enter name of Application: applic1
Enter name of Application: applic2
Enter name of Application:
Enter name of database:(Applications from different databases can also be linked to the executable). The Empress 4GL Executable Builder then creates the appropriate C data files containing read only data and compiles and links them along with the 4GL runtime libraries to make a customized executable.
Creating files .....
Compiling ..........
Linking ...............The application applic1 can now be run by simply entering the name of the executable:
exec1Application applic1 was chosen because it was the first one entered above.
If application applic1 needs a default user database then enter:
exec1 -d userdbIf you wish to run a different application at startup you may do so by entering:
exec1 -d userdb -a applic2
For more information on the Empress 4GL Executable Builder, refer to the Empress 4GL: Tools Reference manual.