Module Construction and Templates [ HP ALLBASE/4GL Developer Reference Manual Vol. 1 ] MPE/iX 5.0 Documentation
HP ALLBASE/4GL Developer Reference Manual Vol. 1
Module Construction and Templates
The module builder constructs a number of HP ALLBASE/4GL items to create
a module. The following list shows the items that can be built for a
module:
* A process.
* A screen.
* Function key sets.
* Functions.
* SQL logic blocks.
* Constants.
* Variables.
* Messages.
* Help screens.
The module builder creates items by copying templates, which are stored
in library applications, into the current application and making the
necessary modifications. A template holds all the required information
to create a single item in the resultant module. Together the templates
specify the module operation described at the beginning of this section.
You can modify the templates to obtain module operation that suits your
own needs. Refer to the Templates and Item Naming section for lists of
all the templates, and refer to Template Libraries for further
information on the library applications.
Module Construction
Module construction involves five steps:
1. Definition of the template type.
2. Creation of the resultant screen.
3. Creation of the main process.
4. Processing the to do list.
5. Generation of all items on the done list.
The to do list is an internal system list that contains the names of all
the templates required to create the items for the complete module. The
done list is an internal system list that contains the names of all items
that module builder creates for the module.
Template Type.
The templates that the module builder uses to create a module are
influenced by file type and module type. These two parameters have been
combined into template type. Template type is represented by a two
letter code. The first letter depends on the file type, the second
letter on module type.
The first letter of the template type is one of those listed below:
Code Letter Usage
A All file types.
D Duplicate keyed KSAM file.
F Fixed-length serial file.
I Unique keyed KSAM file.
S Unique keyed HP ALLBASE/SQL table.
T Duplicate keyed HP TurboIMAGE/iX data set.
U Unique keyed HP TurboIMAGE/iX data set.
V Variable-length serial file.
Z Duplicate keyed HP ALLBASE/SQL table.
The second letter of the template type is one of those listed below:
Code Letter Usage
A All modules.
E Secondary file links with validation,
maintenance module.
I Inquiry module.
M Maintenance module.
W Secondary file links without validation.
Many template names include the template type in the name character
string. For example, all templates with the template type ZM would have
the character string "_ZM_" included in their template names, such as the
process template "HP_mb_ZM_proc".
Resultant Screen.
After defining the template type, the module builder searches through the
library applications for the screen template that complies with the
template type. The module builder then creates the resultant screen.
The layout of the resultant data screen depends on whether you specified
Y or N at the Include All Fields prompt in the module builder screen. If
you specified Y, HP ALLBASE/4GL attempts to fit all the fields in the
record layout for the main file onto the resultant screen. If you
specified N, HP ALLBASE/4GL only places one field in the resultant
screen. You must specify the remaining screen fields with the module
details screen.
The first line of the resultant screen is the banner line. It consists
of the application name (communication area field *SUITE) at the left, a
screen title in the center, and the screen name (communication area field
*SCREEN) at the right. The screen title consists of the short
description field from the dictionary definition of the main file and
some literal text.
The rest of the resultant screen is used for label and field pairs. The
text for the label is the text in the short description field on the
field specification screen. The first pair is the input key field and
its label. This label and field pair are placed at the top of the
resultant screen, separate from the remaining fields. Modules accessing
serial files do not have keyed access, but the module builder still
places this first field and label pair separate from the remaining
fields.
The format of the resultant screen depends on the length, type, and
number of fields placed on the screen. If there are only a small number
of fields to be placed on the screen, the field and label pairs are in
one column down the center of the screen. The alignment column is
determined by the center point of the longest label field pair. The
vertical spacing is adjusted so that the fields remain as one block in
the center of the screen.
If a field and its label don't fit on one line, the field appears on the
line immediately under the label. If a field is too large to fit on one
line (that is, greater than 78 characters in length), it is omitted from
the screen and a message is displayed. This message is written to the
trace log file.
If there are more than 18 fields, a two column format is used. Where a
label and field pair will not fit in one of these two columns, it
occupies the entire line. If there is insufficient space for a two
column format the module builder packs as many fields as possible onto
the screen. Starting at the second line of the screen, it places label
and field pairs, separated by a single space, from top left to bottom
right.
The tabbing sequence through the screen fields is from left to right, top
to bottom, with screen wrap-around from bottom right to top left.
The module builder places a higher priority on placing all fields on the
screen than on the appearance of the screen. Where there is sufficient
space for all fields, it attempts to make the screen image as
intelligible as possible. You can modify the layout of the screen, once
it has been built, using the screen painter.
If there is insufficient space to fit all fields on the screen, HP
ALLBASE/4GL displays a message for each field that is omitted. These
messages are also written to the trace log file.
When the module builder has completed creating the resultant screen, it
generates the screen, and places the template names of any function key
sets, help screens, or after functions on the to do list. The to do list
specifies the items required for the module, listing them as template
names. The module builder then creates the after functions for linking
fields in the resultant screen with secondary files.
If the screen template does not define a required set of function keys,
the module builder adds the template name of a standard set to the to do
list. The template name for the standard set has a suffix: _key1.
Main Process.
After creating the resultant screen, the module builder then searches for
the main process template. It copies this template in memory, performs
any macro substitution and name substitution required, renames it, and
then copies it into the current application. The process name is then
added to the done list for subsequent generation. Refer to Macro and
Name Substitution and to Naming Templates and Items for further
information.
To Do List Processing.
Each template on the to do list is processed individually following the
sequential procedure below:
1. The module builder searches through the application hierarchy for
a template where the name of the template matches the name on the
to do list. If it cannot find the required template, the module
builder substitutes the second letter of the template type
specified in the to do list name with "A", and searches again for
the template. If it still cannot find a matching template, the
module builder replaces the template type contained in the to do
list name with "AA" and searches again. If it doesn't locate a
template this time, the module builder displays an error message
and moves to the next item on the to do list. The application
hierarchy is described in Template Libraries.
2. When the template is found, the module builder copies it into
memory.
3. The module builder then performs any macro substitution required
for the template. Macro substitution is followed by name
substitution, if it is required, which can result in the addition
of template names to the to do list. Refer to Macro and Name
Substitution for further information.
4. The completed item is copied into the current application with the
correct name based on the item naming rules, which are covered in
the subsection Naming Templates and Items.
5. The name of the item is added to the done list.
6. The module builder moves on to the next item in the to do list.
To do list processing finishes when there are no further items on the to
do list.
Item Generation.
When the module builder has completed the to do list, it generates all
the items on the done list that require generation. This completes the
construction of the module. If the construction proceeded without
errors, HP ALLBASE/4GL displays a message stating that the module was
successfully created; otherwise, it displays a message stating that
errors occurred and that the module may not function correctly.
Template and Item Naming
Template Naming.
Template names follow a set of rules that allow easy specification of
those templates required for a particular module. These naming rules
also allow systematic searching through the library applications for a
required template. Unlike item naming, template naming is not an
automatic process. If you create templates for the module builder to
use, you must give them names that follow the naming rules.
Template names must comply with the following rules:
* All template names begin with HP_mb_.
* If use of the template by the module builder is dependent on the
file type and module type, the remaining characters in the name
follow these rules:
- Next in the template name is the two letter template type
code. The template type code is described in the section
called Module Construction.
- The final part of the template name is an underscore (_)
character and a four-character suffix indicating the
function of the item created from the template in the
resultant module.
- Names for the resultant screen templates have the suffix
_scrn.
- Names for the main process templates have the suffix
_proc.
- Name suffixes for functions are listed in table 8-4.
- Name suffixes for SQL logic blocks are listed in table
8-5.
* As the use of variables, constants, and messages in the resultant
module is not dependent on the file type, the final part of the
template names for these items is a 10-character suffix. This
suffix indicates the function of the item in the resultant module.
Refer to table 8-6 for a list of templates for variables and
constants. Refer to table 8-7 for a list of templates for
messages.
Item Naming.
When the module builder copies a template into the current application to
create an item, it renames it. The name given also follows a set of
rules. These rules result in item names that are influenced by the name
of the template that created it and the module name you specify.
Item names comply with the following rules:
* The names of all items created by the module builder begin with
mb_.
* The resultant screen and the main process are both named mb_name,
where name is the module name you specify.
* Names for functions, SQL logic blocks, and other processes are
called mb_name_xxxx, where name is the module name and xxxx
indicates the items function in the resultant module. The
suffixes for functions are shown in table 8-4. The suffixes for
SQL logic blocks are shown in Table 8-5.
* After functions for link fields are named mb_name_l_yy, where name
is the module name and yy is the sequence number of the field in
the resultant screen.
* The messages, constants, and variables created all have fixed
names. Names for messages are listed in table 8-7. Names for
variables and constants are listed in table 8-6. These tables
also list the names of the templates from which the items come.
* Help screens have the name mb_XX_scrY, where XX is the template
type and Y is the help screen number for that template type.
There may be more than one help screen for each template type.
Template Libraries
The module builder searches for a required template through a hierarchy
of four applications used to store all templates used for module
building. First in the hierarchy is the current application, followed by
the three library applications. When the search for a template fails at
one level, the module builder searches the next level in turn.
Library applications are only used to store templates for the module
builder, they cannot be run as stand alone applications.
The order in which these applications are searched is as follows:
Current Application.
The module builder first searches for templates in the application you
are currently developing. This means that you can define templates that
specifically match the requirements of your current application, and
place them in the current application.
Site Customizable Template Library.
The module builder next searches a user library application. This user
library application is called ULIBnnn, where nnn is the three digit code
referring to your language identifier. In this library you store
templates that you have created for use in several applications.
Native Language Template Library.
Your localization center may have prepared local language versions of the
templates. If this is true, you will also have an application called
HPLIBnnn, where nnn is the three digit code referring to your language
identifier. Refer to the Native Language Support (NLS) documentation
supplied with you operating system for more information. The HP
ALLBASE/4GL system administrator can use the administrator printing
facility to see which HPLIB applications exist on your system.
Standard Template Library.
By default, all required templates exist in an application called
HPLIB000. This application is a part of the HP ALLBASE/4GL product.
Once you have access, use the developer printing utilities to print the
contents of the HPLIB applications.
NOTE Do not modify the templates in the HPLIB library applications. If
you want to modify the templates, copy them to the ULIB application
or the current application and modify them there.
If you modify the HPLIB application, you will need to re-install a
new set of S-files or reload the HPLIB application from a clean set
of S-files.
Macro and Name Substitution
Within application items there are cross references to fields, record
layouts, files, SQL table items, and other application items. The names
of all these are unique for each module. To ensure that all references
are resolved, there are macros and template names in the templates that
are substituted with unique names during the module building process.
Macros refer to files and their components, and SQL table items, while
template names refer to other application items.
Processes and Functions.
After the module builder copies the templates for processes and functions
into the current application, it executes macro substitution as follows:
@DATABASE@ Replaced by the name of the HP TurboIMAGE/iX database
associated with the main data set, or the name of the HP
TurboIMAGE/iX database associated with the secondary data
set when processing a _link template.
@FILE@ Replaced by the name of the main file, unless processing a
_link template, in which case it is replaced by the name of
the secondary file.
@RECORD@ Replaced by the name of the record layout for the main file,
or the secondary file when processing a _link template.
@INDEX@ Replaced by the name of the index field for the main file,
or the secondary file when processing a _link template.
@LINK@ Only valid when processing a _link template function. It is
replaced by the name of the SQL logic block associated with
this function.
@SCREEN@ Replaced by the name of the resultant screen item.
Macro substitution is performed line-by-line through the logic block.
Macro substitution is done before name substitution. All valid
substitutions are made, including those within quote strings and
comments. You can quote a single @ by using @@.
Macros can be placed within the DEFINE command. Thus this line would
work in a template for a logic block:
DEFINE %KEY% F-@INDEX@.@FILE@.@RECORD@.
In the resultant item, macro substitution would produce the following
line:
DEFINE %KEY% F-index_field.file_name.record_layout.
When performing name substitution, the module builder searches through
the logic block and replaces all template names with the corresponding
application item name. Name substitution follows the naming rules
detailed in the section on Item Naming earlier in this chapter. When the
module builder finds a template name, it checks whether the name is on
the to do or done lists, and if not, places the name on the to do list.
If the module builder finds an unknown macro or an unmatched @ during the
construction process, it displays a warning message.
SQL Logic Blocks.
There are a number of additional macros used in SQL logic blocks. These
are:
@FIELD@ Replaced by the field specification name of the current
screen field when processing a _link template.
@TABLE@ Replaced by the name of the current SQL table.
@COLUMNS@ Replaced by a list of SQL table column names to update,
excluding the index field.
@VALUES@ Replaced by a list of screen fields that correspond to SQL
table column names.
@UPDATECLAUSE@ Replaced by a list of fields to update. Formatting for the
list is "column name = screen field."
When the module builder is processing a _link template the values
relevant to the secondary file are substituted. Name substitution is not
relevant to SQL logic blocks.
Function Key Sets.
When the module builder creates the function key sets in the current
application it performs name substitution for all the functions called.
Screen Titles.
Two templates are used for screen titles: one for maintenance modules
and one for inquiry modules. The @FILE@ macro is used in these titles,
and is replaced with the main file name. The module builder shifts the
first character of the name to uppercase when it used in a screen banner
line. These templates are not copied into the module. After
substitution, the text becomes a literal on the resultant screen.
Templates
This subsection details the templates that exist in the HPLIB000 library
application. The purpose of making these templates available to you as a
developer is to enable you to copy the templates into ULIBnnn or your
current application, and modify their logic and layout to suit your
needs. You can use the developer utilities to list the items within
template library applications and copy them from the HPLIB library
applications.
NOTE Do not modify the templates in the HPLIB library applications. If
you want to modify the templates, copy them to the ULIB application
or the current application and modify them there.
If you modify an HPLIB application, you will need to re-install a
new set of S-files, or reload the unmodified HPLIB application from
a clean set of S-files.
Screens.
There is a screen template for each template type. The entire screen is
overwritten when the module builder creates a new screen. Any changes
you make to the screen layout template are overwritten when a new screen
is created. You can modify the screen description, and you can modify
the screen that is produced for a module. Many screens have sets of
function keys associated with them. These function key sets partly
define the operation of the resultant module.
All screen templates have the name HP_mb_XX_scrn, where XX is the
template type code. The name of the resultant screen in the module is
mb_name, where name is the module name you specify.
Function Key Sets.
There are a number of templates for function key sets. Some are
associated with particular screen templates, and some are sets of
standard function keys. The functionality of the resultant module
revolves around the functions called from the function key sets. If you
want to customize modules, you must modify these application items.
Names for function key set templates all begin with HP_mb_XX_, where XX
is the template type. The name is completed with a four-character suffix
from the following table. The name of the resultant application item
begins with mb_name, where name is the module name, and ends with the
same four-character suffix.
Table 8-3. Function Key Template and Resultant Item Suffixes
---------------------------------------------------------------------------------------------
| | |
| Suffixes | Comment |
| | |
---------------------------------------------------------------------------------------------
| | |
| _key1 | Function key set for scanning in inquiry modules. |
| | |
---------------------------------------------------------------------------------------------
| | |
| _add1 | First set of function keys used when in add mode. |
| | |
---------------------------------------------------------------------------------------------
| | |
| _add2 | Second set of function keys used when in add mode. |
| | |
---------------------------------------------------------------------------------------------
| | |
| _mod1 | First set of function keys used when in modify mode. |
| | |
---------------------------------------------------------------------------------------------
| | |
| _mod2 | Second set of function keys used when in modify mode. |
| | |
---------------------------------------------------------------------------------------------
| | |
| _del1 | First set of function keys used when in delete mode. |
| | |
---------------------------------------------------------------------------------------------
| | |
| _del2 | Second set of function keys used when in delete mode. |
| | |
---------------------------------------------------------------------------------------------
| | |
| _rev | Set of function keys used when a module accessing a variable length |
| | serial file is in review mode. |
| | |
---------------------------------------------------------------------------------------------
Maintenance modules often require a pair of function key sets for each
suffix because the function keys for file scanning cannot be presented in
one set.
Processes and Functions.
There is a separate process template for each template type. There are
several function templates. Each resultant module contains a single main
process and a number of functions. The functions required depend on the
template type, the module functionality, and any linking to secondary
files. For example, some function templates are used for screen field
after functions and some for functions called by function key sets.
You can use all the logic commands available in HP ALLBASE/4GL within
process and function templates. However, you cannot place logic command
synonyms within templates. The module builder doesn't support all HP
ALLBASE/4GL items. The items not supported are listed at the end of this
section.
All main process templates have the name HP_mb_XX_proc, where XX is the
template type code. The name of the resultant process in the module is
mb_name, where name is the module name you specify.
Names for function templates all begin with HP_mb_XX_, where XX is the
template type. The name is completed with a four-character suffix from
the following table. The name of the resultant item begins with
mb_name_, where name is the module name, and ends with a four-character
suffix.
Table 8-4. Function Template and Resultant Item Suffixes
----------------------------------------------------------------------------------------------
| | | |
| Template | Item | Comment |
| Suffix | Suffix | |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| _addm | _addm | Changes the module to add mode after clearing the screen and |
| | | buffers. |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| _curs | _curs | Opens a cursor in a SQL table. |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| _del | _del | Deletes the currently displayed record. |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| _err | _err | Displays errors reported by SQL. |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| _find | _find | Performs a generic read. |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| _frst | _frst | Retrieves first record in the file. |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| _last | _last | Retrieves last record in the file. |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| _link | _l_yy | Used to retrieve record in secondary file with index value |
| | | from field yy. |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| _lock | _lock | Reads the current record with lock. |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| _mode | _mode | Changes the current module mode. |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| _modi | _modi | Modifies the currently displayed record. |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| _modm | _modm | Changes the module to modify mode. |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| _next | _next | Retrieves the next record from the file. |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| _prev | _prev | Retrieves the previous record from the file. |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| _quit | _quit | Quits the module and exits to the previous menu. |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| _read | _read | Performs an absolute read. |
| | | |
----------------------------------------------------------------------------------------------
SQL Logic Blocks.
SQL logic blocks are required when either the main file or a secondary
file is an SQL table. Templates for SQL logic blocks only require macro
substitution when the template is copied into the current application.
Names for SQL logic block templates all begin with HP_mb_XX_, where XX is
the template type. The name is completed with a four-character suffix
from the following table. The name of the resultant item begins with
mb_name_, where name is the module name, and ends with a four-character
suffix.
Table 8-5. SQL Logic Block Template and Resultant Item Suffixes
----------------------------------------------------------------------------------------------
| | | |
| Template | Item | Comment |
| Suffix | Suffix | |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| _curs | _curs | Selects records with the current key for inquiry or update. |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| _del | _del | Deletes the currently displayed record. |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| _expl | _expl | Retrieves the next SQL error. |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| _find | _find | Selects all records with index values greater than, or equal |
| | | to, the displayed key value, in index order. |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| _frst | _frst | Selects all records from the table in index order. |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| _ins | _ins | Inserts a new record in the table. |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| _last | _last | Selects all records from the table in reverse index order. |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| _link | _l_yy | Selects record in secondary file with index value from field |
| | | yy. |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| _modi | _modi | Updates the currently displayed record. |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| _next | _next | Selects all records after the current index value, in index |
| | | order. |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| _prev | _prev | Selects all the records before the current index value in |
| | | reverse index order. |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| _read | _read | Selects the current record for inquiry or update. |
| | | |
----------------------------------------------------------------------------------------------
Variables and Constants.
There are a number of templates for variables and constants. Templates
for variables and constants do not have the template type code in their
names. The following table lists all the templates for variables and
constants, and shows the names of resultant items.
The following table uses these conventions:
* Used in this module.
D Used if the main file index allows
duplicates.
U Used if the main file index is unique.
Table 8-6. Templates for Variables and Constants
------------------------------------------------------------------------------------------------------------------
- - File Type and Module Type -
------------------------------------------------------------------------------------------------------------------
| Item Name | Template | HP | KSAM & | Serial (F) | Serial (V) |
| | | ALL- | HP | | |
| | | BASE | Turbo- | | |
| | | /SQL | IMAGE | | |
| | | | /XL | | |
------------------------------------------------------------------------------------------------------------------
- Variables - M - I - M - I - M - I - M - I -
------------------------------------------------------------------------------------------------------------------
- mb_curr_mode - HP_mb_curr_mode - * - - * - - * - - * - -
------------------------------------------------------------------------------------------------------------------
- mb_got_cursor - HP_mb_got_cursor - D - D - - - - - - -
------------------------------------------------------------------------------------------------------------------
- mb_got_record - HP_mb_got_record - U - U - * - * - - * - - * -
------------------------------------------------------------------------------------------------------------------
- mb_quit_flag - HP_mb_quit_flag - D - - - - - - - -
------------------------------------------------------------------------------------------------------------------
- mb_undo_done - HP_mb_undo_done - * - * - - - - - - -
------------------------------------------------------------------------------------------------------------------
- Alpha-numeric Constants - -
------------------------------------------------------------------------------------------------------------------
- mb_add - HP_mb_add - * - - * - - * - - * - -
------------------------------------------------------------------------------------------------------------------
- mb_delete - HP_mb_delete - * - - * - - - - - -
------------------------------------------------------------------------------------------------------------------
- mb_modify - HP_mb_modify - * - - * - - * - - - -
------------------------------------------------------------------------------------------------------------------
- mb_no - HP_mb_no - * - * - * - * - - * - - * -
------------------------------------------------------------------------------------------------------------------
- mb_review - HP_mb_review - - - - - - - * - -
------------------------------------------------------------------------------------------------------------------
- mb_yes - HP_mb_yes - * - * - * - * - - * - - * -
------------------------------------------------------------------------------------------------------------------
- Numeric Constants - -
------------------------------------------------------------------------------------------------------------------
- mb_bad_insert - HP_mb_bad_insert - - - U - - - - - -
------------------------------------------------------------------------------------------------------------------
- mb_eof - HP_mb_eof - - - * - * - * - * - * - * -
------------------------------------------------------------------------------------------------------------------
- mb_no_file - HP_mb_no_file - - - - - - * - - * -
------------------------------------------------------------------------------------------------------------------
- mb_no_record - HP_mb_no_record - - - * - * - - - - -
------------------------------------------------------------------------------------------------------------------
- mb_rec_lock - HP_mb_rec_lock - - - * - - - - - -
------------------------------------------------------------------------------------------------------------------
- mb_sql_badins - HP_mb_sql_badins - U - - - - - - - -
------------------------------------------------------------------------------------------------------------------
- mb_sql_eof - HP_mb_sql_eof - * - * - - - - - - -
------------------------------------------------------------------------------------------------------------------
- mb_sql_no_rec - HP_mb_sql_no_rec - D - - - - - - - -
------------------------------------------------------------------------------------------------------------------
Messages.
The messages are created only once in each application. You can modify
the text of the messages in the template applications. It is best not to
change the message type as this may affect the flow of control when the
message is displayed. The message names in the resultant module and the
message template names are listed in the table of message usage. This
table also details where module builder uses each message.
The following tables use these conventions:
* Message used in this module.
D Message used if main file index allows
duplicates.
U Message used if main file index is unique.
Table 8-7. Message Usage by Template Type
------------------------------------------------------------------------------------------------------------------
- - File Type and Module Type -
------------------------------------------------------------------------------------------------------------------
| Message | HP ALLBASE | KSAM & | Serial (F) | Serial (V) |
| | SQL | HP Turbo- | | |
| | | IMAGE | | |
| | | /XL | | |
------------------------------------------------------------------------------------------------------------------
- Name - Template - M - I - M - I - M - I - M - I -
------------------------------------------------------------------------------------------------------------------
- mb_add_ok - HP_mb_add_ok - * - - * - - * - - * - -
------------------------------------------------------------------------------------------------------------------
- mb_avail_rec - HP_mb_avail_rec - - - D - - - - - -
------------------------------------------------------------------------------------------------------------------
- mb_bad_insert - HP_mb_bad_insert - U - - - U - - - - -
------------------------------------------------------------------------------------------------------------------
- mb_begin - HP_mb_begin - * - * - * - * - * - * - - -
------------------------------------------------------------------------------------------------------------------
- mb_blank_key - HP_mb_blank_key - D - D - - - - - - -
------------------------------------------------------------------------------------------------------------------
- mb_blank_mess - HP_mb_blank_mess - * - * - * - * - * - * - * - * -
------------------------------------------------------------------------------------------------------------------
- mb_chg_mode - HP_mb_chg_mode - * - - * - - * - - * - -
------------------------------------------------------------------------------------------------------------------
- mb_del_ok - HP_mb_del_ok - * - - * - - - - - -
------------------------------------------------------------------------------------------------------------------
- mb_empty_file - HP_mb_empty_file - * - * - * - * - * - * - * - * -
------------------------------------------------------------------------------------------------------------------
- mb_end - HP_mb_end - U - U - * - * - * - * - - -
------------------------------------------------------------------------------------------------------------------
- mb_end_chgmde - HP_mb_end_chgmde - - - - - - - * - -
------------------------------------------------------------------------------------------------------------------
- mb_eof - HP_mb_eof - - - - - - - - * -
------------------------------------------------------------------------------------------------------------------
- mb_io_status - HP_mb_io_status - - - * - * - * - * - * - * -
------------------------------------------------------------------------------------------------------------------
- mb_last_key - HP_mb_last_key - D - D - - - - - - -
------------------------------------------------------------------------------------------------------------------
- mb_mod_ok - HP_mb_mod_ok - * - - * - - * - - - -
------------------------------------------------------------------------------------------------------------------
- mb_more_rec - HP_mb_more_rec - - - - - - - * - * -
------------------------------------------------------------------------------------------------------------------
- mb_no_file - HP_mb_no_file - - - - - * - - * - -
------------------------------------------------------------------------------------------------------------------
- mb_no_modechg - HP_mb_no_modechg - * - - * - - - - - -
------------------------------------------------------------------------------------------------------------------
- mb_no_modify - HP_mb_no_modify - - - - - - * - - * -
------------------------------------------------------------------------------------------------------------------
- mb_no_record - HP_mb_no_record - * - * - * - * - - - - -
------------------------------------------------------------------------------------------------------------------
- mb_rec_lock - HP_mb_rec_lock - - - * - - - - - -
------------------------------------------------------------------------------------------------------------------
- mb_sql_status - HP_mb_sql_status - * - * - - - - - - -
------------------------------------------------------------------------------------------------------------------
| mb_link_error | HP_mb_link_error | Included when a field is linked to a |
| | | secondary file, with Validate = Y. |
------------------------------------------------------------------------------------------------------------------
| mb_link_warn | HP_mb_link_warn | Included when a field is linked to a |
| | | secondary file, with Validate = N. |
------------------------------------------------------------------------------------------------------------------
Help Screens.
Each template type has a number of help screens that are copied into the
module for the user to access while running the module. The help screens
are only copied into the current application if they don't already exist.
Information in the help screens assumes that the module will operate in
the manner defined by the templates in the HPLIB library applications.
If you change the functionality of the module, you will need to change
the relevant help screens.
Help screen templates have the name HP_mb_XX_scrY, where XX is the
template type code and Y is the number of the help screen required for
the template type. Some template types require more than one help screen
in the module. The module help screens item names are "mb_XX_scrY, where
XX and Y are as defined above.
Application Titles.
These are a special case. They are not created in the resultant
application, but are used to create the text for the banner line in the
resultant screen. The module builder searches for and replaces the
string :FILE: within the application title with the short description of
the module's main file. The two application titles are as follows:
HP_mb_inq_banner. This text is centered at the top of the resultant
screen for all inquiry modules. The default value for HP_mb_inq_banner
is:
@FILE@ Inquiry Screen
HP_mb_mnt_banner. This text is centered at the top of the
resultant screen for all maintenance modules. The default value for
HP_mb_mnt_banner is:
@FILE@ Maintenance Screen
Items Not Supported.
There are a number of application items that the module builder cannot
include in the module. This means that the functionality associated with
these items cannot be automatically included in the module; however, you
can modify a resultant module to include these application items. You
may have to regenerate some or all of the module after you make
modifications. Those items not supported by the module builder are:
* Application titles (except in the special case defined above).
* Calculated items.
* Decision tables.
* Master titles.
* More then one resultant screen.
* Reports.
* Scratch pad field names.
* SQL select lists.
* Validation ranges.
* Validation tables.
* Work areas.
Also, the module builder cannot support synonyms for logic commands.
MPE/iX 5.0 Documentation