IFLIST (HLI function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 1: Line 1:
The conventions used on this page are described in [[HLI: Function call list#Function call notation conventions|Function call notation conventions]].
The conventions used on this page are described in [[HLI: Function summary#Function call notation conventions|Function call notation conventions]].


==Summary==
==Summary==

Latest revision as of 23:05, 12 July 2016

The conventions used on this page are described in Function call notation conventions.

Summary

Description
The IFLIST call (LIST) places the current set of found records on a list.
Thread type
single cursor IFSTRT
IFCALL function number
17

Syntax

IFLIST(RETCODE,LIST_NAME)

Compile-only form
Not available
Execute-only form
Not available

Specify the parameters in the syntax order shown above.

Parameter Description
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.

Usage notes

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.