Data extraction parameters

The data extraction parameters are used to extract user data from index LRECs into a user-specified area when lower-level LRECs are read.

Read syntax diagramSkip visual syntax diagram,ADI= 0,ADI= adival,LDI= 0,LDI= ldival,LLE= 0,LLE= lleval
ADI=adival
Specifies a displacement value, into the storage area specified by the AREA parameter on the DBOPN or DBRED macros, or the are parameter on the dfopn or dfred functions, where adival is a decimal value. The user data in an index LREC specified by the LDI and LLE parameters are extracted to that location.
LDI=ldival
The displacement in an index LREC of the start of the data to extract, where ldival is a decimal value.
LLE=lleval
The number of bytes of user data to extract, where lleval is a decimal value.
For multi-level indexes, as shown in Figure 1, the DBDEF for each lower-level index file or detail file in the structure can identify the data to extract from the index LREC by using the LDI and LLE parameters, and where to put the data in the user-specified area using the ADI parameter. There is one common user-specified area to hold the data from all index LRECs used on a single DBRED or dfred application programming interface (API) call. For example, you can code:
DBRED REF=GR02SR,REG=R4,AREA=EBW000,ALG=C'SR176'
Figure 1. Multi-level indexes
Alternate text