Unloading and Loading Applications - Overview [ HP ALLBASE/4GL Developer Administration Manual ] MPE/iX 5.0 Documentation
HP ALLBASE/4GL Developer Administration Manual
Unloading and Loading Applications - Overview
The next few pages provide an overview of the HP ALLBASE/4GL application
unloading and loading utilities. Before you attempt to use these
utilities, read through these pages to gain an understanding of the
procedures.
The application unload and load utilities allow you to unload
applications from the HP ALLBASE/4GL S-files or to load an application
into the S-files.
The application unload utility unloads an application definition from the
S-files into a single MPE/iX file. This file is identified as NAME in
the group and account identified by the variable HP4APPNPATH, and NAME is
the name of the application. The application unloading facility does not
delete the original application or change it in any way. If you want to
delete an application from the system, use the administrator deletions
screen.
NOTE You cannot create files in any account other than your login
account. If the HP4APPNPATH variable is not set, or refers to a
group and account that is not writable, HP ALLBASE/4GL displays an
error message and the application unloading process aborts.
The application load utility reverses this process and loads an
application into the S-files from a previously unloaded application file.
These functions in combination allow you to unload an application and
load it into a different set of S-files, or even transport it to a
different MPE/iX system.
Unloading Versions
HP ALLBASE/4GL allows you to unload up to 10 versions with an
application. Note however, that you cannot unload a version without the
base application.
Under some conditions, unloading run-only copies of more than one version
with an application may result in data file corruption when the
application and version are loaded onto the target system. If you unload
two or more versions with an application, HP ALLBASE/4GL displays a
warning message asking if you want to proceed with the unload.
Refer to "Version Data Files" , for more information about the
conditions that may result in version data file corruption.
Application Definition Records
HP ALLBASE/4GL allows you to unload an application with or without the
application definition records. These records hold the details that have
been entered on the application definition screen. Normally, you would
include the application definition records with the application if you
are unloading an application for first release to another HP ALLBASE/4GL
system. This means that the application definition records are written
into the S-files on the destination system when the application is
loaded.
If you are unloading an application for first release to an HP
ALLBASE/4GL run-time environment, you must include the application
definition records with the application. The run-time environment does
not allow the administrator to create new application definitions.
In general, you would not include the application definition records if
you are unloading an application for subsequent release to a run-time
environment. In this case, the existing application definition, which
contains the user names and password definition for the application,
should not be overwritten.
Run-Only Applications
You can unload a run-only copy of an application for a run-time
environment without unloading the source code for generated components.
If you unload a run-only copy of an application, the generated components
of the application cannot be modified after the application has been
loaded to a different HP ALLBASE/4GL system. In this format, the
following components of the application cannot be modified:
* Calculated items.
* Decision tables.
* Functions.
* Messages.
* Processes.
* Record layouts.
* Reports.
* Screens.
* SQL logic blocks.
Most other components in an application can be secured against
modification with a development security code. Refer to Chapter 4
for more information about application security.
You can also unload the source code with the application. In this case,
a developer can modify any components in the application that are not
secured with a development security code.
KSAM Data Files
The application unloading and loading utilities do not unload or load any
KSAM data files used by the application. To load an application to an HP
ALLBASE/4GL system, you may also need to install a set of data files on
the target system.
Application developers can create KSAM data files directly using the data
file creation facilities in the developer application. Alternatively,
you can copy a set of data files onto the system from tape, disk or
cartridge. These files can be empty or can contain data.
To load an application to an HP ALLBASE/4GL run-time environment, you
must also load the data files for the application from tape. Without the
developer application, HP ALLBASE/4GL cannot create KSAM data files
directly, so you need to load at least an empty set of data files to the
data file group and account (indicated by the HP4DATAPATH variable). The
HP ALLBASE/4GL run-time environment then maintains these data files.
KSAM Data File Reformatting
Under some circumstances, KSAM application data files used by HP
ALLBASE/4GL applications must be reformatted during the application
loading procedure.
If you are loading an application to update an existing application, the
data files must be reformatted under the following circumstances:
* Dictionary field specifications have changed.
* The number of fields or the sequence of fields on any file record
layouts has changed.
* The number, names, or positions of any key fields on record layout
have changed.
In the HP ALLBASE/4GL developer environment, application developers can
use the data file reformat screen in the dictionary menu to reformat KSAM
data files. The source code for the application must be present to allow
this screen to be used to reformat data files.
In the HP ALLBASE/4GL run-time environment, or in a developer environment
where source code for the application is not present, the data file
reformat screen cannot be used to reformat data files. HP ALLBASE/4GL
provides an automatic data file reformatting system to reformat data
files in these circumstances.
NOTE The HP ALLBASE/4GL automatic data file reformat system can only
reformat data files in the MPE/iX group and account identified by
the variable HP4DATAPATH. Data files in other MPE/iX groups and
accounts are not reformatted during application loading.
The automatic data file reformat system uses a file that contains
information about the structure of the application data files. HP
ALLBASE/4GL creates this file-structure file during the unloading process
for run-only applications. This file has the same name as the
application, and is created in the group and account identified by the
variable HP4FSPATH. The HP4FSPATH variable must exist, and must identify
a writable group before you execute the unloading process for a run-only
application.
The unload utility extracts the definition of the application data files
from the S-files and writes this information into the file-structure
file.
The data file reformat system also uses the structure files for KSAM data
files. The structure file is identified as NAMES.!HP4DATAPATH where NAME
is the name of the file.
The actions taken by the data file reformat system depend on the
presence or absence of these files. In general, there should be one
file-structure file for each application, and one structure file for each
KSAM data file. If the file-structure file exists, and the structure
files for the data files exist, HP ALLBASE/4GL reformats the data files
for the application automatically during the application loading process.
If the structure file for any application data file is not present, that
data file is not reformatted. Removing or renaming the structure file
for a data file is one way of preventing a file from being reformatted.
If the file-structure file is not present during the loading procedure,
HP ALLBASE/4GL does not reformat any data files.
NOTE To reformat a data file under the MPE/iX operating system, you must
be the owner of the file.
Version Data Files.
If a version uses data files that have a format that is different from
the format of the data files for the base application, HP ALLBASE/4GL
only reformats the version data files. The base application data files
are not reformatted.
During the unloading process for run-only applications, HP ALLBASE/4GL
extracts the definitions of data files from the S-files and writes the
information into the file-structure file. If you are unloading a version
with a base application and the version file format is different from the
base application file format, HP ALLBASE/4GL only writes the version file
definitions to the file-structure file. Under these conditions, the base
application file definitions are not written to the file-structure file.
CAUTION Don't attempt to unload more than one version of an application
if the versions use different data file structures.
If you do unload multiple versions that all have different file
structures, the file-structure definitions of subsequent
versions are added to the file-structure file. When you load
the application and versions to the target system, the version
data files may be corrupted.
If you need to reformat data files for a number of versions of an
application and the versions all use different data file formats, you
must unload and subsequently reload the versions individually. (Note
that you must unload the base application with each version. You cannot
unload a version without unloading the base application.)
If you need to reformat the data files for a base application, you must
load a copy of the application by itself without any versions. To do
this, the application must first be unloaded without any versions.
HP ALLBASE/SQL Applications
The application unloading and loading process involves some additional
functions for unloading and loading applications that use HP ALLBASE/SQL
databases.
Database Module Files.
The complete definition of an application that uses an HP SQL database
consists of the application definition file for the application, plus the
database module containing the stored sections for the application. HP
ALLBASE/4GL normally creates an MPE/iX file containing the database
module for an application when the application is generated, or all SQL
blocks in an application are generated. The database module file for an
application or version has the same name as the application or version,
and is created in the group and account identified by the HP4DBMPATH
variable. Note that HP ALLBASE/4GL creates one database module file for
an application, and one module file for each version of an application.
To load an application into an HP ALLBASE/4GL system, the application
definition file for the application, the database module file for the
application (and the database module files for each version of the
application) must be present on the destination MPE/iX system.
The HP ALLBASE/4GL application unloading utility allows you to generate
an application before you unload it. This ensures that the database
module files for the application are up-to-date.
Database Module Installation.
During the application loading process, HP ALLBASE/4GL installs the
database modules contained in the database module files into the database
environment for the application. The database environment for the
application should exist before you start the application loading
process.
If the database environment does not exist, HP ALLBASE/4GL will display
an error message during the application loading procedure. Under these
conditions, HP ALLBASE/4GL displays a message allowing you to enter the
name of a database environment.
Database Table Creation.
During loading, HP ALLBASE/4GL automatically creates HP ALLBASE/SQL
tables required by HP ALLBASE/4GL applications.
If the tables required by the application don't exist, HP ALLBASE/4GL
creates them. If the tables already exist, they are not changed in any
way.
HP ALLBASE/SQL Table Reformatting.
HP ALLBASE/4GL does not provide facilities for reformatting HP
ALLBASE/SQL tables.
If you need to reformat an HP ALLBASE/SQL table to reflect changes to
field types or the structure of record layouts, you can use the HP ISQL
UNLOAD and LOAD facilities. These facilities allow you to write the
contents of an HP ALLBASE/SQL table to a file and then reload the file
into a new restructured HP ALLBASE/SQL table.
Refer to the HP ISQL manuals for more information about using the UNLOAD
and LOAD utilities.
HP TurboIMAGE/iX Applications
No extra procedures are necessary to unload applications that access one
or more HP TurboIMAGE/iX databases.
HP TurboIMAGE/iX Data Set Reformatting.
HP ALLBASE/4GL does not have facilities for reformatting HP TurboIMAGE/iX
data sets.
If you need to reformat an HP TurboIMAGE/iX data set to reflect changes
to field types or the structure of record layouts, you can use HP
TurboIMAGE DBchange/XL, if it exists on your system. This tool allows
you to alter the security and structure of an HP TurboIMAGE/iX database
with ease.
Disk Space Requirements
The unloaded application file, the file-structure file, and the database
module files (if required) for large applications may require a megabyte
or more of disk space.
Make sure that you have sufficient disk space available on the MPE/iX
system before you start the application unloading procedure.
When you are loading an application, the target system must have
sufficient disk space to accommodate the unloaded application files.
If the loading process involves reformatting KSAM data files, you must
have additional free disk space to accommodate the temporary files that
HP ALLBASE/4GL creates during the reformat. You must have enough free
disk space to hold a copy of the largest single data file that will be
reformatted.
MPE/iX 5.0 Documentation