Multifetch and Prefetch Options

The ADABAS Multifetch and Prefetch options reduce execution time and allow ADABAS data to be retrieved with a high degree of efficiency. By buffering multiple record results from a single call, Multifetch and Prefetch reduce the communication overhead between the ADABAS Interface and the ADABAS nucleus.

ADABAS Release 5.3.2 is the first release to support Multifetch, and Release 4.0 is the first release to support Prefetch. The ADABAS Interface uses the Multifetch option if it is available (this is the default option), or the Prefetch option if it is available. The option available is determined by your site's environment.

The Interface trace file FSTRACE4 contains the following information about the Fetch feature:

For more information on FSTRACE4, see Debugging Techniques.


Top of page

Invoking Multifetch/Prefetch

The Multifetch/Prefetch feature requires that OPEN=YES (the default value) is specified in the Access File. The Multifetch/Prefetch feature is activated as long as OPEN=YES is specified. There are two ways to deactivate (or reactivate) this feature:

Note: The SET commands override the Access File settings. This setting will be in effect for the entire FOCUS session.


Top of page

SET Command Syntax

The syntax for the SET commands is

{CMS|MVS} ADBSINX SET FETCH ON
{CMS|MVS} ADBSINX SET FETCH OFF
{CMS|MVS} ADBSINX SET FETCH DEFAULT
{CMS|MVS} ADBSINX SET FETCHSIZE n
{CMS|MVS} ADBSINX SET FETCHSIZE MAX[IMUM]

where:

CMS
Indicates the CMS operating system.

MVS
Indicates the MVS operating system.

ON
Sets the Fetch feature on for the user session.

OFF
Sets the Fetch feature off for the user session.

DEFAULT
Uses the information from the Access File. This value is the default.

n
Is the number of records per buffer (1-999). The buffer size varies with the size of the record and can be different for each TABLE request. The buffer size limit is 32K. The default is 10 records per buffer.

MAX
Is automatically calculated by the ADABAS Interface to allow the maximum number of records that fit in a 32K buffer.


Top of page

Access File Syntax

FETCH and FETCHSIZE are applicable only to segments described as ACCESS=ADBS in the Access File.

The Access File can contain the following attributes in the SEGNAM statement

FETCH = {ON|OFF}
FETCHSIZE = {n|MAX[IMUM]}

where:

ON
Sets the Fetch feature on for the user session. This value is the default.

OFF
Sets the Fetch feature off for the user session.

n
Is the number of records per buffer (1-999). The default is 10 records per buffer.

MAX
Is automatically calculated by the ADABAS Interface to allow the maximum number of records that fit in a 32K buffer.

Here is an example of the FETCH and FETCHSIZE attributes in the sample Access File for EMPLOYEES:

$$$ CREATED BY AUTOADBS ON 03/18/97 AT 15.04.22 BY PMSMJB
$$$ FILENAME=EMPFILE1,SUFFIX=ADBSINX,$
RELEASE=6,OPEN=YES,$
$ ADABAS FILE = EMPLOYEES                         DICTIONARY =
SEGNAM=S01 ,ACCESS=ADBS,FILENO=001,CALLTYPE=RL,
SEQFIELD=PERSONNEL_ID,FETCH=ON,FETCHSIZE=15,$
FIELD= DEPT_PERSON ,TYPE=SPR,$
FIELD=DEPT_S03 ,TYPE=DSC,NU=YES,$
FIELD=NAME_S03 ,TYPE= ,NU=NO,$
Figure 8-1. The FETCH and FETCHSIZE Attribute

See your Software AG documentation for more information about the Multifetch/Prefetch feature.


Information Builders