Application Design Considerations [ HP ALLBASE/4GL Developer Reference Manual Vol. 2 ] MPE/iX 5.0 Documentation
HP ALLBASE/4GL Developer Reference Manual Vol. 2
Application Design Considerations
The following paragraphs outline some application design considerations
that will help you develop applications that are readily portable between
operating systems. These considerations are described under the
following headings:
* Application and Version names.
* Screen field behaviour.
* Data manager differences.
* Reporting environment.
* Using external programs.
* Administrator functionality.
Application and Version Names
Under the HP-UX operating system, application and version names can
contain alphabetic characters, numbers, and the underscore character (_).
The name must start with an alphabetic character.
Under the MPE/iX operating system, application and version names must be
valid MPE/iX file names. (HP ALLBASE/4GL uses the application name as
the name of the database module file, and the application definition
file.) MPE/iX application and version names should only use the
characters A to Z and 0 to 9.
HP ALLBASE/4GL is case sensitive with respect to application and version
names, although MPE/iX files names are not case sensitive. This means
that you must be careful about the application and version names you
choose under MPE/iX, or clashes may occur. For example, HP ALLBASE/4GL
would regard the two application names ACCOUNTS and accounts as being
distinct. Under MPE/iX, the database module files and application
definition files for both these application would have the name ACCOUNTS.
Screen Field Behaviour
Under the HP-UX operating system, HP ALLBASE/4GL terminal input and
output is character based. Under the MPE/iX operating system, terminal
input and output is field or line based. As a result, the user interface
and screen field behaviour is somewhat different between the operating
systems.
Under MPE/iX, the user must press Return or Tab to terminate a field
entry. No other characters can signify to the host system that data
entry for a field is complete. In contrast, under a character based
input and output system (such as HP-UX), any action that moves the cursor
off a field terminates data entry for that field.
Auto-Flow Fields.
Under character based input and output systems, HP ALLBASE/4GL allows you
to define a screen field with automatic flow to next behaviour. When the
user enters sufficient characters to fill the field, HP ALLBASE/4GL
automatically commits the field, performs the normal field commit
processing such as executing the field function, and then continues to
process the next field on the screen.
This feature is not available under the MPE/iX operating system. If you
do set the Automatic Flow to Next field to Y, the setting is ignored.
The user must always press Return or Tab to terminate data entry for a
field.
Justification and Case Shifting.
Under the HP-UX operating system, HP ALLBASE/4GL performs field
justification and case shifting (for forced uppercase U edit code fields)
automatically during data entry. Under the MPE/iX system, justification
and case shifting cannot occur until the user commits the field. The
data is displayed correctly after the field is committed.
Error Field Highlighting.
If a user enters invalid data in an input field, HP ALLBASE/4GL
automatically highlights the field. By default, the highlight is
flashing inverse video.
Under the HP-UX operating system, HP ALLBASE/4GL automatically removes
the error highlight when the user starts reentering data in the field.
Under the MPE/iX operating system, the error highlighting remains until
the user commits the field again by pressing Return or Tab.
Data Manager Differences
The functionality of the HP ALLBASE/SQL database system is the same on
both the HP-UX and MPE/iX operating systems.
HP TurboIMAGE/XL databases can only be used on MPE/iX operating systems.
HP ALLBASE/4GL also lets you use KSAM (Indexed Sequential Access Method)
or KSAM (Keyed Sequential Access Method) data files. These data
management systems provide similar functionality, although some important
differences do exist. These difference are described below under the
following headings:
* External file names.
* Limits.
* Locking mechanism.
* Data file recovery.
These differences only apply to the KSAM and KSAM data managers.
External File Names.
The ISAM data manager under MPE/iX does not allow the external name of a
file to be longer than seven characters, since the eighth character is
used as a suffix to identify the file type. The following table shows
the external names of the files for KSAM and KSAM data files.
ISAM KSAM
Data File name.dat name
Index or Key File name.idx nameK
Structure File name.str nameS
Under the MPE/iX operating system, external file names can use the
characters A to Z, and 0 to 9. Note that MPE/iX is not case sensitive
with respect to file names. By choosing suitable external names for data
files you can ensure that application definitions will be portable across
operating systems.
Limits.
The ISAM data manager allows up to 16 key fields on a file record. The
KSAM data manager under the HP-UX operating system allows up to 19 key
fields on a file record.
Locking Mechanism.
The MPE/iX KSAM data manager only allows locking at the file level. This
means that only one user can access a given file at any time to add,
modify or delete a record. (Under some circumstances, multiple users can
access the same file in a read-only mode.)
Under the HP-UX operating system, the KSAM data manager provides record
level locking. This allows multiple users to access the same file at the
same time, while still maintaining full data integrity.
The KSAM data manager under HP-UX provides a MODE *UNLOCK for accessing
files and a FILE *UNLOCK command. When a file is opened under this mode,
all record locks obtained by the current process are retained until the
process terminates, the file is explicitly closed, or the locks are
released using the FILE *UNLOCK command. These commands allow multi-user
access to a file, yet ensure transaction integrity for a transaction that
involves more than one record in a given file. The KSAM data manager
does not provide this feature.
Under the MPE/iX system, the MODE *WRITE, and MODE *UNLOCK commands
perform the same action as the MODE *LOCK command.
Refer to chapter 12 for more information about data file locking.
Data File Recovery.
Under the HP-UX operating system, HP ALLBASE/4GL provides a roll-forward
data file recovery system for KSAM data files. This system is not
available under other operating systems.
Refer to the HP-UX Developer Administration Manual for more information
about the data file recovery system.
HP ALLBASE/4GL also provides a transaction control system that allows a
developer to roll-back a partially complete transaction. (This
functionality is provided by the TRANSACT logic command.) The operation
of this system is similar under both the MPE/iX operating system and the
HP-UX operating system.
Reporting Environment
Some differences exist in the way that HP ALLBASE/4GL directs reports to
printers on different operating systems.
Under the HP-UX operating system, HP ALLBASE/4GL directs reports to one
of four system printers, the user's terminal, or a slave printer attached
to an HP terminal. The system administrator must specify the device
names for the system printers on the system-wide definition screen in the
administrator application.
Under the MPE/iX operating system, HP ALLBASE/4GL writes reports to a
formal file designator rather than a physical device. The user can then
use a file equation to direct the report to the required device or device
class. By default, reports are directed to device class LP. (Under
MPE/iX HP ALLBASE/4GL can also display reports on the user's terminal or
print them on a slave printer.)
Reports developed under one operating system can be transported to other
operating systems without any changes. There is no need to generate the
report after it has been loaded into the target system. When you
transport a report developed under HP-UX to an MPE/iX system, HP
ALLBASE/4GL uses the HP-UX output file name as the name of the formal
designator for the report. Regardless of the HP-UX printer number used
for the report, HP ALLBASE/4GL directs the report to a file designator.
If you transport a report developed on an MPE/iX system to an HP-UX
system, HP ALLBASE/4GL uses the formal file designator name for the
report as the name of the HP-UX output file for the report. HP
ALLBASE/4GL assumes a value of 1 for the HP-UX printer number.
Reports that are directed to the user's terminal or a terminal slave
printer can be transported between operating systems without any changes.
Using External Programs
HP ALLBASE/4GL allows an application to call an external program. The
external program can receive parameters from HP ALLBASE/4GL, and return
values to HP ALLBASE/4GL. The external program must be written in a
language that is supported on the host operating system, and must be
compiled and linked to run on that target system.
The mechanism for returning values from an external program to HP
ALLBASE/4GL differs between MPE/iX and other operating systems.
Under the HP-UX system, the external program returns values to HP
ALLBASE/4GL by writing them on file descriptor number 3. Under MPE/iX,
the external program can return values by writing them to the message
file HP4EXTP using the FWRITE intrinsic.
Refer to the description of the EXTERNAL command in chapter 12 for more
information about using external programs.
Administrator Functionality
Under the HP-UX operating system, the HP ALLBASE/4GL administrator
application provides facilities for file backup, restoration and
recovery. It also provides facilities for printer and report control.
These facilities are not provided under other operating systems.
Refer to the HP-UX HP ALLBASE/4GL Developer Administration Manual for
more information about these facilities.
MPE/iX 5.0 Documentation