Search using a PCB with a stand-alone index
Related topics
Assume that your application program issues a DL/I call against an index to retrieve duplicate data.
The primary DEDB is not accessed. Code the PCB as follows:
PCB DBDNAME=DIVSI4,KEYLEN=99,PROCOPT=G
For this type of call, you must specify PROCOPT as a retrieval.
The application program tries to retrieve all Student segments with Student Area Code 111. The program issues the following DL/I call:
CALL 'CBLTDLI' USING FUNC-GU
DIVSI4-PCB
USER-IO-AREA
SSA-DIVSI4-QUAL
DIVSI4-PCB
USER-IO-AREA
SSA-DIVSI4-QUAL
The qualified SSA in the program would look like the following example:
ROOTSEG *-(ROOTKEY >=111ooooooooooooooo*
ROOTKEY <=111fffffffffffffff)
ROOTKEY <=111fffffffffffffff)
A lowercase o represents a low value; a lowercase f represents a high value.
When your application program successfully retrieves the Student segment, the following information is returned to the program:
I/O area: POINTER SEGMENT OF THE INDEX
Key feedback area: 111STUD#LOC#COURS1
<-SUBSEQ field->
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*