VFW126 – Using Space Objects (Optional)
Introduction to Spaces
Space objects are primarily designed to support 'batch' style functions that process large volumes of information. You can load the required information into a space at the start of a function and then repeatedly (re)access the indexed space more efficiently than you can access the DBMS directly.
Space objects are unique within a process by their name. Space objects cannot be shared between processes. Space objects are not persistent. A Space object and its data content cease to exist when the process that owns them ends.
Space objects are defined and accessed using Built In Functions (BIF). A BIF is a call to program which has a defined set of inputs and outputs. BIFs are defined in the
and this means that the editor supports BIFs with a predefined set of input and output parameters.BIFs are accessed using the USE command.
Objectives
A
command handler for the Reports business object will display a list of all employees. The command handler also defines a space object. All employees are added to the space object, keyed by their department code and employee number.A second command handler,
, will read entries in the space object by department code and display a list of currently selected employees in this department.The space object exists within a single Windows process. For a VL Frameworks application, this means all components running within a Framework could access the space object, once it has been created.
To meet these objectives you will complete the following steps:
Step 1. Create the Salary Command Handler
Step 2. Create the Employee Query Command Handler.
Step 3. Add Logic to the Employee Query Command Handler
Before You Begin
Complete exercises VFW030, VFW040 and VFW042.