IFFNDX (HLI function)
The conventions used on this page are described in Function call notation conventions.
- The IFFNDX call (FIND EXCLUSIVE) selects records from a Model 204 file or group, enqueuing in exclusive mode, and creates a found set.
- Thread type
- multiple cursor IFSTRT, single cursor IFSTRT
- IFCALL function number
- Compile-only form
- IFCALL function number: 57
- Execute-only form
- IFCALL function number: 58
Specify the parameters in the syntax order shown above.
|RETCODE||[O,i,r] The Model 204 return code is the required first parameter. The code is a binary integer value.|
|FIND_SPEC||[I,c,r] The find specification is a required input parameter which is the selection criteria to be used for retrieving records. Specify the selection criteria as a character string.
See FIND_SPEC for a detailed description of the find specification used for IFFIND that is also valid for IFFNDX.
|TIME_SPEC||[I,i,r] The time specification is a required input parameter. Specify an integer value which is the number of times to try the find in the event of an enqueuing conflict; the wait time is in 3-second periods.|
|FNDX_NAME||[I,s,r/o] The name of the IFFNDX compilation is an input parameter that is required for use with a multiple cursor IFSTRT thread, and is only required for a single cursor IFSTRT thread if using the Compiled IFAM facility (IFFNDXC and IFFNDXE). Model 204 saves the compilation using this name.
Specify the name as unique, and as a short character string (maximum 32 characters).
Note: A null value is equivalent to omitting the name parameter, and is not valid for a multiple cursor thread.
|%VARBUF||[I,c,o] The variable buffer is an optional input parameter that addresses a data area which accommodates up to 255 bytes of data per value. The buffer contains values which are defined by the %VARSPEC parameter, below, to be assigned to %variables. Specify a character string.
For information about %variables, see Using variables and values in computation.
|%VARSPEC||[I,c,o] The variable specification describes the format of the data that is contained in the %VARBUF parameter and lists the %variables to be assigned. %VARSPEC specifies the contents of the variable buffer, described above. Specify a character string which follows a LIST, DATA, or EDIT syntax.
%VARSPEC is a required input parameter if %VARBUF is specified.
Use the IFFNDX call to retrieve records and to hold the found set in exclusive mode. The find specification is based on a specified combination of retrieval conditions and is identical to the one that is used with the IFFIND call.
If a call to IFFNDX results in an enqueuing conflict, Model 204 waits at most three seconds and then tries again, for as many times as specified in the time parameter (the wait time is in 3-second periods). After trying unsuccessfully for the number of times specified in the time parameter, Model 204 returns a completion code of 3 to the HLI program.
For more information, see ENQRETRY parameter.
Coding example (COBOL)
WORKING-STORAGE SECTION. 01 CALL-ARGS. 05 RETCODE PIC 9(5) COMP SYNC. 05 QUAL-1 PIC X(75) VALUE 'SEX=FEMALE; OCCUPATION=DOCTOR OR DENTIST; CITY=BOSTON;NAME LIKE "PAT*";END;'. 05 NUMRTRY PIC 9(5) COMP SYNC VALUE 3. . . . PROCEDURE DIVISION. . . . CALL "IFFNDX" USING RETCODE, QUAL-1, NUMRTRY.