IFLIST (HLI function)
The conventions used on this page are described in Function call notation conventions.
- The IFLIST call (LIST) places the current set of found records on a list.
- Thread type
- single cursor IFSTRT
- IFCALL function number
- Compile-only form
- Not available
- Execute-only form
- Not available
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.|
|LIST_NAME||[I,c,r] The list name is a required input parameter that specifies the name of a list. Specify the name as a character string, up to 255 alphanumeric characters in length. Blank characters are not valid.|
Use IFLIST to place records on a list. The list name can then be used in an IFFIND with the LIST$ specification.
If a list name is reused in a call to IFLIST, the old list is cleared and the original set of records on the list is no longer available. Otherwise, lists are available until the file is closed.
Lists built by IFLIST contain only pointers to records; they do not contain the actual data records. In a group context, the list can contain records from all files in the group.
Restrictions on using IFLIST
The following restrictions apply to using IFLIST:
- Lists cannot be shared across threads.
- You cannot use IFLIST with sorted record sets.
Coding example (COBOL)
WORKING-STORAGE SECTION. 01 ARGS-FOR-CALL. 05 RETCODE PIC 9(5) COMP SYNC. 05 LISTSAVE PIC X(5) VALUE `SAVE;'. . . . PROCEDURE DIVISION. . . . CALL "IFFIND" USING RETCODE, SPEC-1. CALL "IFLIST" USING RETCODE, LISTSAVE. CALL "IFFIND" USING RETCODE, SPEC-2. CALL "IFLIST" USING RETCODE, LISTSAVE.
In this example, only records from the second IFFIND are on the list named SAVE after the last IFLIST call is executed.