ALLBASE/4GL Enhancements [ COMMUNICATOR 3000/XL XL RELEASE 3.0 ] MPE/iX Communicators
COMMUNICATOR 3000/XL XL RELEASE 3.0
ALLBASE/4GL Enhancements
by Michael O'Connor
Australian Software Operation
Release B.03 of ALLBASE/4GL is now available with release 3.0 of MPE XL.
This article discusses the changes to ALLBASE/4GL and any important
information you need to know about the release.
AN IMPORTANT NOTE ABOUT INSTALLATION
Before you install the MPE XL 3.0 release, which contains the B.03
release of ALLBASE/4GL, you should unload any existing ALLBASE/4GL
applications that you have on your current system.
Unloading is an administrative task, and the ALLBASE/4GL Developer
Administration Manual (P/N 30601-64001) provides step-by-step
instructions for unloading an application.
If you are using ALLBASE/4GL in a Run-Time environment, you will not be
able to unload your applications. If you have copies of your
applications on the original source media supplied by your application
developer, you can load these applications again from the source media.
If you do not have any original source media, back up your applications
before updating your system.
PRODUCT ENHANCEMENTS
This release introduces the following enhancements to the ALLBASE/4GL
developer system.
Dynamic Loading (Executable Library Interface)
Dynamic loading of Native Mode (NM) Executable Library (XL) routines
(written in the C' language) from within ALLBASE/4GL applications is now
possible using the new Executable Library (XL) Interface. The following
features are available as part of the new XL interface:
* You can pass arguments to the XL routine by value or by reference.
* You can use most ALLBASE/4GL dictionary items to store the
arguments.
* You can specify one or more XL's to search for the called
function.
The new logic command CALL is used to invoke an XL routine. The values
required by the CALL command are placed in ALLBASE/4GL storage elements.
The CALL command requires two mandatory arguments; the name of the
routine and the name of the Executable Library. Optionally zero or more
ALLBASE/4GL item names are specified, one for each argument to the
routine. For example, the following logic block demonstrates the setting
of values and invocation of the CALL command:
MOVE "fn_name" V-routine ;
2 NOTE fn_name = name of the routine to call
3 MOVE "XL.MYGRP.MYACCT" *P21 ;
4 NOTE XL.MYGRP.MYACCT = name of XL
5 MOVE "45" V-value2 ;
6 NOTE V-value2 = the second argument to the routine
7 CALL *REFRESH V-function *P21 S-value1 *V *CHAR V-value2 *R *INT
In step 7 the *REFRESH modifier has two effects. Before the XL routine
is called, the terminal is set to the terminal setting before ALLBASE/4GL
was invoked. On return from the XL routine, the terminal is restored to
the correct terminal setting for ALLBASE/4GL. For each argument specified
in the CALL command two modifiers are specified. The first modifier must
have the value *R or *V, which respectively signify argument by reference
(any change to the value is reflected in ALLBASE/4GL) and argument by
value (any change to the value is not reflected in ALLBASE/4GL). The
second modifier specifies the argument type, which may the value *INT,
*SHORT, *CHAR, *FLOAT, *DOUBLE. The arguments correspond to the native
'C' language types of pointer to int, pointer to short, pointer to char
(string), pointer to float and pointer to double. Any argument of type
*CHAR (string) is terminated with a NULL character before being passed by
ALLBASE/4GL to the XL routine. This NULL character is added to allow the
XL routine to easily determine string lengths, and is ignored by
ALLBASE/4GL on return.
The ALLBASE/4GL developer has control over the loading and binding
sequences for the XL routine. This control is exercised by using one or
both of an XL load list in the ALLBASE/4GL startup script and an XL
library name parameter in the CALL command.
NOTE Care must be exercised when using the CALL command. The called XL
routine executes in the SAME process as ALLBASE/4GL. The XL routine
has the potential to cause a segmentation violation if it performs
any illegal actions. Writing past the end of a character array
that has been passed to the XL routine is an example of an illegal
action.
Name Recall
The TAB key has been re-defined in the Developer and Administrator
applications to allow access to the Name Recall facility. The Name
Recall facility provides context sensitive searching for item names.
Access to the facility is the default behavior when ALLBASE/4GL is
started however Name Recall may be disabled with a command line argument.
When disabled, Name Recall is still accessible via the function key
sequence "System Keys/Search Keys".
When the cursor is on a screen field, pressing the TAB key activates Name
Recall. Name completion is attempted using the last item in the current
field (as long as it is a valid ALLBASE/4GL name). Assume that the
cursor is on the Function field of the Screen Field Details screen. The
string "read_f" would expand to "read_file" if such a Function exists.
If the function doesn't exist an error message is displayed. If the
current screen field doesn't have an associated type then ALLBASE/4GL
uses the type of the first field on the current screen.
Regardless of the outcome of the Name completion attempt, a new set of
function keys is displayed. The function keys include Next Item,
Previous Item, Next Type, Previous Type and Restore. The Restore key
will return the field contents to the value before Name Recall was
invoked.
If Name Recall is activated on a screen field, any field commit action
will cause ALLBASE/4GL to resume normal field handling.
Catalog Display
The function keys in the ALLBASE/4GL Developer now provide direct access
to the Catalog Display system. The More Keys Function Key Set (see HP
ALLBASE/4GL Developer Reference Manual volume 1, chapter 2 for a
description of this Key Set) now has key F6 labeled Catalog Display.
Pressing this function key activates the Catalog Display Screen in one of
two ways.
The first method applies to screen fields which are used to enter the
names of a single ALLBASE/4GL data type. For example, if the current
field is the Function field on the Screen Field Details Screen pressing
the Catalog Display function key will display the first page of function
names. If multiple pages of function names exist, pressing Return
displays the next page. Pressing return on the last page completes the
Catalog Display and returns the developer to the Screen Field Details
Screen. If there are no function names the Catalog Display screen
appears briefly, accompanied by a message, and control returns
immediately to the screen from which the function key was pressed.
The second method applies to screen fields which are not restricted to a
single ALLBASE/4GL item type. For example, if the current field is a
comment field on the Field Specifications Screen pressing the Catalog
Display function key will display the Catalog Display Screen. The Item
Type field on the Catalog Display screen will contain the number
corresponding to the previous screen. In this example, the field will
contain the number 1, corresponding to Field Specifications. The
Developer can overtype the number to select the required Item Type and
press Return. The first page of items are displayed. Pressing the
Return key displays the next page. Pressing return on the last page
completes the Catalog Display and returns the developer to the Screen
Field Details Screen. If there are no field specification names, the
Catalog Display screen appears briefly, accompanied by a message, and
control returns immediately to the Field Specification screen.
MPE/iX Communicators