15.10 - Variable Length Fetch - Call-Level Interface Version 2

Teradata Call-Level Interface Version 2 Reference for Mainframe-Attached Systems

prodname
Call-Level Interface Version 2
vrm_release
15.10
category
Programming Reference
featnum
B035-2417-035K

Variable Length Fetch is a one byte field that specifies the location of the length information for the data made available from the response.

 

In this language...

The variable name for Variable Length Fetch is...

COBOL

DBCAREA‑VAR‑LEN‑FETCH

PL/I

VAR_LEN_FETCH

C

var_len_fetch

IBM

DBOFVAR

 

This routine...

Does this for Variable Length Fetch...

DBCHINI

writes

DBCHCL

reads (CON; RSUP; CMD; IWPF; IRQ; CRQ)

 

Variable Fetch Length is used by...

To...

applications

write

Variable Length Fetch is initialized by DBCHINI to the default value provided for Variable Length Fetch in the HSHSPB.

When the value for Variable Length Fetch is not appropriate for the application, you should perform the following procedure before calling DBCHCL for Connect, RunStartUp, Command, Initiate with Protocol‑Function, or Initiate Request:

1 Set Change Options to 'Y'.

2 Change the value for Variable Length Fetch as follows.

 

If the length information is to...

Then change the value for Variable Length Fetch to...

precede immediately the string to which it applies

Y

be supplied separately from the string to which it applies

N

For a parcel of data made available by DBCHCL from the response, DBCHCL supplies to the application both the length and the address of the data.

 

If Variable Length Fetch is set to this value...

Then the address in Fetch Data Pointer points to...

N

the beginning of the parcel body and the length of the parcel body is supplied separately in Fetch Returned Data Length.

Y

a two‑byte length (in binary) field that precedes the parcel body, and the length of the parcel body is not supplied in Fetch Returned Data Length.

You can set Variable Length Fetch to ‘Y‘ only if Parcel Mode Fetch is set to ‘Y‘.

If the Maximum Parcel option is set to H, then the two-byte length is considered to be an unsigned value. Because PL/I does not support unsigned integers, you cannot use the Variable Length Fetch option to allow the PL/I VARYING attribute for the Fetch Data pointer for responses greater than 32767.

Since the maximum value that can be contained in the two-byte length is 65535, responses with Variable‑length‑fetch that require larger lengths will be rejected.