Find Field Numbers in List (QGYFNDF) API


  Required Parameter Group:


  Default Public Authority: *USE

  Threadsafe: No

The Find Field Numbers in List (QGYFNDF) API returns the number of the entry in a list of information and the value of that field whenever the value of that field changes. Two types of find operations are supported.


Authorities and Locks

None.


Required Parameter Group

Request handle
INPUT; CHAR(4)

The handle of the request. When a list API is called, a handle is returned upon successful completion. One of these handles is required as input to this API.

Receiver variable
OUTPUT; CHAR(*)

The receiver variable that receives the information requested. You can specify the size of the area to be smaller than the format requested as long as you specify the length parameter correctly. As a result, the API returns only the data that the area can hold.

Length of receiver variable
INPUT; BINARY(4)

The amount of data the application program is prepared to receive. If the length specified is larger than the amount of data available, the receiver is not changed beyond the amount of data available.

The receiver variable must be large enough to hold one array entry. For format FNDF0100 the minimum receiver length must be:

  4 + field length rounded up to a multiple of 4
For format FNDF0200 the minimum receiver length must be:
  40
Format name
INPUT; CHAR(8)

The content and format of the information returned. The possible format names are:


Field specification
INPUT; CHAR(*)

The fields to search for a break. For the FNDF0100 format this parameter must be an array of field offsets and field lengths. The fields specified are considered one logical field for comparison when searching for changes in the fields. The values for the fields will be returned in the receiver variable concatenated in the same order they are specified in this parameter. For the FNDF0100 format, this parameter must have the following layout:



For the FNDF0200 format, this parameter must have the following layout:


Total number returned
OUTPUT; BINARY(4)

The total number of array entries returned in the receiver variable. This is not necessarily the total number of entries available. If the receiver variable is not large enough to hold all available entries, the record number parameter is set to the record number where the next break occurs.

Record number
I/O; BINARY(4)

On input, the record to begin searching for field breaks. This should be set to 1 for the initial call for a list so that searching begins with the first record. This program always assumes a field break to have occurred at the record specified by this parameter. Thus, the record specified is always returned in the receiver variable.

On output, this parameter indicates whether the information in the receiver variable is partial or complete. If the receiver variable is complete, this parameter will be set to zero. If the receiver variable contains partial information, this parameter will be set to the record number where the next field break occurs. This value can be specified as input on a subsequent call to this program to continue the search for field breaks.

Error code
I/O; CHAR(*)

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


Format of Receiver Variable

Format FNDF0100



Format FNDF0200



Field Descriptions

Device name. The name of the printer device where the spooled file is printed.

Field value. The value of the field where the break occurs.

This is a concatenation of the fields specified to search on. The fields are concatenated in the order they were specified in the field specification parameter. The length of this field is the sum of all field lengths specified in the field specification parameter.

Output queue library. The name of the library containing the output queue that the spooled file is assigned.

Output queue name. The name of the output queue that the spooled file is assigned.

Padding for boundary alignment. A reserved field.

Printer assigned value. The value specifying whether this spooled file is assigned to a printer. Valid values are 1 through 3.

Record number. The record number in the list where the break occurs.

Record size. The size of the record in the array shown.


Error Messages



API introduced: V3R6

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