Retrieve Number of Fields Read (QsnRtvFldCnt) API


  Required Parameter Group:

1 Input buffer handle Input Binary(4)

  Omissible Parameter Group:

2 Field count Output Binary(4)
3 Error code I/O Char(*)

  Returned Value:

Field count Output Binary(4)

  Default Public Authority: *USE

  Service Program: QSNAPI

  Threadsafe: No

The Retrieve Number of Fields Read (QsnRtvFldCnt) API returns the number of fields contained in an input buffer after a Read Modified Fields (QsnReadMDT), Read Modified Alternate (QsnReadMDTAlt), or Read Modified Immediate Alternate (QsnReadMDTImmAlt) operation. Use the Retrieve Field Information (QsnRtvFldInf) API to retrieve information about a specific field.

To query the results from a QsnReadInp or 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 operation, 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

Input buffer handle
INPUT; BINARY(4)

A handle for the input buffer that contains the results of the input operation. The input buffer must be filled as a result of a QsnReadMDT, QsnReadMDTAlt, or QsnReadMDTImmAlt operation.


Omissible Parameter Group

Field count
OUTPUT; BINARY(4)

The variable that contains the field count when the QsnRtvFldCnt API has completed.

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

Field count
OUTPUT; BINARY(4)

This API returns the value for the field count parameter, or -1 otherwise.


Error Messages

Message ID Error Message Text
CPF24B4 E Severe error while addressing parameter list.
CPF3CF1 E Error code parameter not valid.
CPF3CF2 E Error(s) occurred during running of &1 API.
CPFA314 E Memory allocation error.
CPFA319 E No data in input buffer.
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
Top | Dynamic Screen Manager APIs | APIs by category