Ch 14. Application Generation and Testing [ HP ALLBASE/4GL Developer Reference Manual Vol. 2 ] MPE/iX 5.0 Documentation
HP ALLBASE/4GL Developer Reference Manual Vol. 2
Chapter 14 Application Generation and Testing
Application Generation
The following components of HP ALLBASE/4GL applications must be generated
before they can be executed:
* Record layouts.
* Data screens and windows.
* Processes.
* Functions.
* Decision tables.
* Calculated items.
* Reports.
* SQL select lists.
* SQL logic blocks.
* Messages.
Generating application components converts your input to executable
run-time code. In the generation process, HP ALLBASE/4GL converts the
application component to an executable form, and resolves references to
other application components.
To generate components of an application, select the Generate option on
the developer main menu. This selection displays the application
generation menu. Selections on this menu allow you to generate some or
all components of an application.
You can also generate application components by pressing the Generate
function key that appears on some HP ALLBASE/4GL developer screens.
Messages and calculated items are generated automatically when you press
the Commit Data function key on the appropriate dictionary screens.
The generation process uses an external program. HP ALLBASE/4GL calls
this program automatically when you generate an application component.
Screen Image
Menu Selections
This screen allows you to generate specific application components, or
the entire application. Highlight the component type that you wish to
generate, and then activate the highlighted item by pressing Return or
pressing the Activate Item function key.
Catalog Display. This selection displays the catalog display screen,
allowing you to display the names of existing application components.
Refer to chapter 13 for details.
Function Keys
f1 Printing Cancels the current screen and displays the catalog
printing screen.
f2 Copying Cancels the current screen and displays the catalog
copying screen.
f3 Deleting Cancels the current screen and displays the catalog
deletions screen.
f4 Catalog Display Cancels the current screen and displays the
catalog display screen.
Additional Information
The selections on this screen allow you to generate groups of components
in an application. Typically, you would use this screen to generate a
group of application components after you have made a change to a
component such as a field specification or a record layout, and you want
to make the change effective throughout the application. To generate an
individual component, use the Generate function key on the appropriate
item screen.
The generation process does not start until you activate the highlighted
item on the menu. Once generation starts, HP ALLBASE/4GL displays a
series of progress messages indicating the status of the generation
process.
If any errors are detected during generation, the generate program
displays a warning message, and generation pauses until you press Return.
The generation process restarts after about 20 seconds if the system does
not receive any input.
Any changes you make to an application component that requires generation
will not be effective until you generate the component.
The following application components don't need to be generated:
* Menus.
* Field specifications.
* Validation ranges.
* Validation tables.
* File definitions.
* Work area definitions.
* Variables.
* Numeric and alphanumeric constants.
* Scratch-pad field name declarations.
* Function key sets.
* Help screens.
* Application titles.
Changes to any of the above components except field specifications are
automatically effective throughout the application.
NOTE If you make a change to a dictionary field specification or a
record layout, you must generate all other application components
that use the field specification or record layout before the change
becomes effective.
During generation, HP ALLBASE/4GL checks references to some other
application components and displays error messages if the referenced
components don't exist. However, HP ALLBASE/4GL does not check
references to the following items:
* Data screens and windows.
* Menus.
* Processes.
* Functions.
* Decision tables.
* Reports.
* SQL select lists.
* SQL logic blocks.
* Messages.
* Help screens.
* Function keys sets.
As a result, HP ALLBASE/4GL may successfully generate an application, and
then display error messages at run-time if the application contains
references to any of these items that have not been defined.
SQL Component Generation.
For some commands in SQL logic blocks, HP ALLBASE/4GL creates stored
sections in the database environment. These sections are stored in a
module in the database environment.
The module has the name owner_group.name where owner_group is the SQL
owner group defined on the application definition screen in the
administrator, and name is the name of the application or version.
When you select the All option or the SQL Logic Blocks option on this
screen, HP ALLBASE/4GL issues a DROP MODULE command, and then rebuilds
the database module with the newly generated SQL sections. HP
ALLBASE/4GL also builds a file containing the definition of the database
module and the definitions of all SQL tables required by the application.
The name of this file is the name of the application or version. The
file is created in the account and group specified by the current value
of the variable HP4DBMPATH. If HP4DBMPATH is not defined, HP ALLBASE/4GL
does not create the database module file.
HP ALLBASE/4GL uses the variable HP4DBMSIZE to determine the file limit
for the database module file. HP ALLBASE/4GL uses a default limit of
4095 records if HP4DBMSIZE is not defined.
Generate Error Log File.
HP ALLBASE/4GL logs all error messages initiated during generation to a
temporary file in the temporary domain of your log-on group and account.
The formal file designator for this file is HP4GNERR.
If desired, you can use a file equation to direct the generate log to a
permanent disk file or a suitable printer.
MPE/iX 5.0 Documentation