Find Entry Number in Message List (QGYFNDME) 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 Message type information Input Char(10)
8 Error code I/O Char(*)

  Default Public Authority: *USE

  Threadsafe: No

The Find Entry Number in Message List (QGYFNDME) API returns the number of the entry in a list of messages for a given key value. This API may be used on a list generated by the following APIs:


Authorities and Locks

None.


Required Parameter Group

Request handle
INPUT; CHAR(4)

The handle of the list, generated by one of the list messages 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 information to search.

Key field offset BINARY(4)
The offset within the list entry to search.
Key field length BINARY(4)
The length of the field within the list entry to search.
Reserved 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 to search for.

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.

Message type information
INPUT; CHAR(10)

The type of message to search for. A valid value must be specified if the messages have been grouped. The possible values are:

*MNR The group of messages that need a reply are searched.
*MNNR The group of messages that do not need a reply are searched.
*SCNR The group of sender's copy messages that need a reply are searched.

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.
GUI0067 E &1 is not valid for message type.
GUI0102 E Offset of field, &1, is not valid.


API introduced: V3R6

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