Find Entry Number in List (QGYFNDE) API


  Required Parameter Group:

1 Request handle Input Char(4)
2 Number of keys Input Binary(4)
3 Key field information Input Array(*) of Char(12)
4 Key field values Input Array(*) of Char(30)
5 Entry number Output Binary(4)
6 Key found Output Char(1)
7 Error code I/O Char(*)

  Default Public Authority: *USE

  Threadsafe: No

The Find Entry Number in List (QGYFNDE) API returns the number of the entry in a list of information for a given key value.


Authorities and Locks

None.


Required Parameter Group

Request handle
INPUT; CHAR(4)

The handle of the list. This handle is generated by one of the following open list APIs:


Number of keys
INPUT; BINARY(4)

The number of elements, within the key field information array, to search.

Key field information
INPUT; ARRAY(*) of CHAR(12)

The offset and length of the information to search.

Key field offset INPUT; BINARY(4)
The offset within the list entry to search.
Key field length INPUT; BINARY(4)
The length of the field within the list entry to search.
Reserved INPUT; CHAR(4)
An ignored field. This field must be set to hexadecimal zeros.

Key field values
INPUT; ARRAY(*) of CHAR(30)

The value of the fields indicated in the key field information parameter for which to search.

Entry number
OUTPUT; BINARY(4)

The number of the first entry in the list in which the key is found. If the key is not found in a sorted list, the number of the entry previous to where the requested entry would have been is returned (a 1 is returned if the entry not found is the first entry in the list). If the key is not found in an unsorted list, a 1 is returned. If the list is empty, a 0 is returned.

Key found
OUTPUT; CHAR(1)

Whether the entry returned is for the key requested or the key was not found. The possible values are:

0 The key was not found. The entry number returned is not associated with the key given.
1 The key was found. The entry number returned is associated with the key given.

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter.


Error Messages

Message ID Error Message Text
CPF24B4 E Severe error while addressing parameter list.
CPF3C90 E Literal value cannot be changed.
CPF3CF1 E Error code parameter not valid.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.
GUI0001 E Invalid handle specified.
GUI0066 E Number of keys must be at least &2.


API introduced: V3R6

[ Back to top | Process Open List APIs | APIs by category ]