SQL Logic Block Generation [ HP ALLBASE/4GL Developer Reference Manual Vol. 1 ] MPE/iX 5.0 Documentation
HP ALLBASE/4GL Developer Reference Manual Vol. 1
SQL Logic Block Generation
When HP ALLBASE/4GL generates an SQL logic block, it performs a syntax
check on the command. A SELECT command in an SQL logic block is
converted to a DECLARE CURSOR for SELECT command. At generate time, HP
ALLBASE/4GL also replaces references to select lists or table record
layouts with the dictionary definitions for these items.
The generated form of the SQL logic block is stored in the HP ALLBASE/4GL
S-files. Depending on the SQL commands, the SQL logic block may also be
stored in the HP ALLBASE/SQL database environment as a chapter in a
database module. The name of the module for an application or version is
owner_group.name where owner_group is the SQL owner group for the
application as specified on the administrator application definition
screen, and name is the name of the application or version.
When you generate all SQL logic blocks in an application, or generate an
entire application, HP ALLBASE/4GL writes the definition of the module to
a database module file. The name of the application is used as the name
of this file. HP ALLBASE/4GL creates this file in the group and account
specified by the variable HP4DBMPATH.
If the HP4DBMPATH variable does not exist, HP ALLBASE/4GL does not create
the database module file.
By default, HP ALLBASE/4GL creates the database module file with a file
limit of 4095 records. You can override this default size by setting the
MPE/iX variable HP4DBMSIZE to the required file limit.
NOTE When you generate all SQL logic blocks, HP ALLBASE/4GL only
performs a COMMIT WORK when all logic blocks have been generated.
It is possible for the SQL log file to become filled during the
generate. This may happen if you have a small log file and a large
number of SQL logic blocks, or archive logging is turned on for
your database environment and the log file is nearly full.
If the log file space is not sufficient, you will receive an SQL
error number 14046 "Log Full".
If you receive this error, the database log files must be enlarged
before you can generate all SQL logic blocks.
If HP ALLBASE/4GL detects any errors during SQL logic block generation,
it displays an error message screen. This screen contains a row and
column reference for the error. These values refer to the cursor row and
column position, within the SQL logic block field, at or near the source
of the error.
MPE/iX 5.0 Documentation