Retrieve Field Information (QsnRtvFldInf) API


  Required Parameter Group:

1 Input buffer handle Input Binary(4)
2 Field number Input Binary(4)
3 Receiver variable Output Char(*)
4 Length of receiver variable Input Bin(4)

  Omissible Parameter Group:

5 Low-level environment handle Input Binary(4)
6 Error code I/O Char(*)

  Returned Value:

Return code Output Binary(4)

  Default Public Authority: *USE

  Service Program: QSNAPI

  Threadsafe: No

The Retrieve Field Information (QsnRtvFldInf) API retrieves information about a field in an input buffer filled by a Read Modified Fields (QsnReadMDT), Read Modified Alternate (QsnReadMDTAlt), or Read Modified Immediate Alternate (QsnReadMDTImmAlt) operation.

To query the results from a Read Input Fields (QsnReadInp) or Read Immediate (QsnReadImm) operation, use the Retrieve Length of Field Data in Buffer (QsnRtvFldDtaLen) and Retrieve Pointer to Field Data (QsnRtvFldDta) APIs. To query the result from any other input operations, use the Retrieve Length of Data in Input Buffer (QsnRtvDtaLen) and Retrieve Pointer to Data in Input Buffer (QsnRtvDta) APIs.


Authorities and Locks

None.


Required Parameter Group

Input buffer handle
INPUT; BINARY(4)

A handle for the input buffer that contains the results of the input operation.

Field number
INPUT; BINARY(4)

The number of the field to query, specified as n, where n is the nth field in the input buffer. The value specified must not be greater than the field count returned by the read operation.

Receiver variable
Output; CHAR(*)

The structure that will contain the result of the query when the QsnRtvFldInf API has completed.

Length of receiver variable
Input; BINARY(4)

The length of the receiver variable parameter.


Omissible Parameter Group

Low-level environment handle
INPUT; BINARY(4)

The low-level environment that the operation applies to. If this parameter is omitted or given with a value of zero, the default low-level environment is used.

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter. If this parameter is omitted, diagnostic and escape messages are issued to the application.


Returned Value

Return code
OUTPUT; BINARY(4)

A return code indicating the result of the operation. The value returned will be 0 if the operation was successful, or -1 otherwise.


Format of the Query Input Field Result

Offset Type Field
Dec Hex
0 0 BINARY(4) Bytes returned
4 4 BINARY(4) Bytes available
8 8 CHAR(1) Type of field
9 9 BINARY(4) Row position of field
13 D BINARY(4) Column position of field
17 11 BINARY(4) Length of data read
21 15 CHAR(11) Reserved
32 20 PTR(SPP) Pointer to field data


Field Descriptions

Bytes available. The number of bytes of data available to be returned. All available data is returned if enough space is provided.

Bytes returned. The number of bytes of data returned.

Column position of field. The column position relative to the window of the specified field on the screen.

Length of data read. The length of the data read from the specified field.

Pointer to field data. A pointer to the data for the specified field.

Row position of field. The row position relative to the window of the specified field on the screen.

Type of field. The type of the specified field. The possible values are:

Value Description
1 Normal field
2 Transparent field


Error Messages

Message ID Error Message Text
CPF24B4 E Severe error while addressing parameter list.
CPF3C24 E Length of the receiver variable is not valid.
CPF3CF1 E Error code parameter not valid.
CPF3CF2 E Error(s) occurred during running of &1 API.
CPFA319 E No data in input buffer.
CPFA31A E Incorrect field number value &1 specified.
CPFA31E E Required parameter &1 omitted.
CPFA32E E Input data for query operation incorrect.
CPFA32F E Buffer type incorrect.
CPFA331 E Buffer handle incorrect.
CPFA334 E Low level environment handle incorrect.


API introduced: V2R3

[ Back to top | Dynamic Screen Manager APIs | APIs by category ]