IFCLST (HLI function)

From m204wiki
Jump to navigation Jump to search

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

Summary

Description
The IFCLST call (CLEAR LIST) performs a clear list function for a specified list on the current thread.
Thread type
multiple cursor IFSTRT
IFCALL function number
108

Syntax

IFCLST(RETCODE,LIST_SPEC,%VARBUF,%VARSPEC)

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_SPEC [I,c,r] The list specification is a required input parameter that specifies the name of a list. Specify the list as a character string using the following format:

LIST listname [{IN FILE filename | GROUP groupname}]

where:

listname is required and specifies the name of a particular list;

IN clause is optional and specifies a file or group context other than the default.

filename specifies the name of a particular file context for the list.

groupname specifies the name of a particular group context for the list.

Note: If the specified list exists, Model 204 removes all records from it. If the specified list does not exist and the IN FILE/GROUP clause is not coded, Model 204 creates and initializes a list within the context of the default file or group on the 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 that are defined by the %VARSPEC parameter, below, to be assigned to %variables. Specify a character string. For more information about %variables, see Declaring %variables and %variable arrays.
%VARSPEC

[I,c,o] The variable specification describes the format of the data that is contained in the %variable parameter, and lists the %variables to be assigned. %VARSPEC specifies the contents of the variable buffer, described above. Specify a character string that follows a LIST, DATA, or EDIT syntax.

%VARSPEC is a required input parameter if %VARBUF is specified.

Usage notes

Use the IFCLST call to remove records from an existing list, or to create a new cleared list.

The IFCLST call is the equivalent of the CLEAR LIST statement in SOUL in the host language multiple cursor environment. For information about the CLEAR LIST statement, see Clearing a list.

The %VARBUF and %VARSPEC parameters can be used to pass a value for the MEMBER %variable when using the following syntax:

IN GROUP groupname MEMBER %variable

Coding example (COBOL)

WORKING-STORAGE SECTION. 01 CALL-ARGS. 05 RETCODE PIC 9(5) COMP SYNC. 05 LISTSPEC PIC X(23) VALUE "LIST FORD IN FILE CARS;". . . . PROCEDURE DIVISION. . . . CALL "IFCLST" USING RETCODE, LISTSPEC.