FOCSAM and the GETPRV User Exit

In this section:

How to:

FOCSAM is the underlying logic for accessing keyed and sequential data sources within Information Builders products using a variety of low-level physical retrieval modules. FOCSAM contains a user exit that can be invoked as an alternative to the standard low-level retrieval routines that are part of FOCSAM. The exit makes it possible to combine user-written code (as a DLL) devoid of any dependence on the internal structures used within IBI products with the logical retrieval functions of FOCSAM, such as record selection logic, treatment of missing records in multi-record files, JOINS between various types of files, etc.

An Access File with a MODNAME= value determines the specific physical DLL loadable library to be used for a given table. The DLL itself must have a matching entry point by the same name as dictated by IBI standards for user written subroutines. The DLL must be physically in the EDACONF user directory, or the IBICPG environment variable must be set to indicate an alternate (directory) location. Any additional entry points within the same module may also be accessed, however, if other modules with additional entry points are needed the Private User Exit module must include "loader" logic to make the entry points available. (Note that these are the same rules used for all customers writing loadable DLL subroutines, as described in the Store Procedures Reference, which you can consult for the finer points of physically building a proper DLL.)


Top of page

x
Procedure: How to Use the Dynamic Private Exit User Exit

This is an overview of the steps for using the Dynamic Private User Exit:

  1. Determine a record layout for the interaction between FOCSAM, the DLL, and any required keys. From the FOCSAM perspective this is the metadata layout within a given Master File. From the DLL perspective this is the structure of the record data being returned within one of the API pointers.
  2. Create a Master File with metadata that matches the chosen record layout.
  3. Create an Access File that specifies the DLL that will be used to access and return the record data.
  4. Design and create the DLL that will perform the data access and return the record data.
  5. Set the IBICPG environment variable to indicate the (directory) location of the DLL before server start up, or place the DLL in the EDACONF user directory.
  6. Access data as if it were just another table (although the actual specifics of the metadata and DLL are more involved).

Top of page

x
General Features of the GETPRV Exit

The general features of the exit are:


Top of page

x
Functional Requirements for Using the GETPRV Exit

Functionally, the exit is a substitute for retrieval calls typically used against key-sequenced VSAM data sources or any data source that can be represented as such a file. The exit need not deal with intra-record structures represented by OCCURS phrases, nor with the translation of FOCUS IF/WHERE conditions into lower-level criteria. Both of these functions are performed by the driving logic within FOCSAM.

The user-written code must conform to the following rules:


iWay Software