Fetch Returned Data Length
Usage Notes
The Fetch Returned Data Length field specifies the length in bytes of the returned data.
Language |
Variable Name |
COBOL: |
DBCAREA-FET-RET-DATA-LEN |
C: DBCAREA.H: |
fet_ret_data_len |
Routine |
Action Taken |
DBCHINI: |
writes |
DBCHCL: |
writes (FET) |
Used by |
Action Taken |
application program |
reads |
After a call to DBCHCL for the Fetch function, the application program can obtain the length of the returned data.
Where the length is provided and what the length refers to depends on the settings in effect when DBCHCL is called for the Connect, Run Startup, or Initiate Request function:
then, the length is in Fetch Returned Data Length; length is the length of the parcel body
then, the length is in first two bytes at address given in Fetch Data Pointer; length is the length of the parcel body
(this last option is not allowed).
then, the length is in Fetch Returned Data Length; length is the length of the parcel body
then, the length is in first two bytes at address given in Fetch Data Pointer; length is the length of the parcel body
then, the length is in Fetch Returned Data Length; length refers to the grand total of all parcels (headers and bodies) in the response buffer
then, there is an error (this last option is not allowed).
In Move Mode only the length number of bytes are affected in the Move area. The bytes beyond are left “as is.”
DBCHCL places Fetch Returned Data Length, if used, in the DBCAREA when the Fetch function completes. Thus Fetch Data Pointer is available when the application program regains control with return code of zero from a call to DBCHCL for the Fetch function.