Changing the Value for Variable-length-fetch - Call-Level Interface Version 2

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

Product
Call-Level Interface Version 2
Release Number
16.10
Published
May 2017
Language
English (United States)
Last Update
2018-05-07
dita:mapPath
jen1488824663137.ditamap
dita:ditavalPath
Audience_PDF_include.ditaval
dita:id
B035-2417
lifecycle
previous
Product Category
Teradata Tools and Utilities

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.