Using-data-pointer-vector - Call-Level Interface Version 2

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

Product
Call-Level Interface Version 2
Release Number
15.00
Language
English (United States)
Last Update
2018-09-28
dita:id
B035-2417
lifecycle
previous
Product Category
Teradata Tools and Utilities

Using‑data‑pointer‑vector

When Using‑data‑pointer‑vector is not zero, Using‑data‑pointer‑vector is a four byte pointer to a vector of pointers to data that is referred to by the USING row descriptor in the request string. When Variable‑length‑request is not specified, the lengths of the data are specified by corresponding entries in the Using‑data‑length‑vector. When Variable‑length‑request is specified, the length of the data precedes the data itself. The number of entries in the list is given by Using‑data‑count.

Using‑data‑pointer‑vector exists only when DBCHINI had been called for a DBCAREA with Total‑length set to at least 640 (that is, the returned DBCAREA Level value is at least 1). For a smaller DBCAREA, Using‑data‑pointer‑vector is ignored.

 

In this language...

The variable name for Using‑data‑pointer‑vector is...

COBOL

DBRIUDPV

PL/I

DBRIUDPV

C

dbriUDPV

IBM Assembler

DBRIUDPV

 

This routine...

Does this for Using‑data‑pointer‑vector...

DBCHINI

writes

DBCHCL

reads (RSUP; IWPF; IRQ)

 

Using‑data‑pointer‑vector is used by...

To...

applications

write

Before calling DBCHCL for the Initiate Request function and if the request contains a USING row descriptor, the application must build a data string.

The data string must contain the data described by the USING row descriptor, and the Variable Length Request will be set to either of the following:

 

When Variable Length Request is set to this value...

Then...

Y

the Using‑data‑length‑vector is ignored and the each data area addressed by Using‑data‑pointer‑vector must point to the two‑byte area containing the length of the using data string, which is followed by the actual using data string.

N

the application must supply the length information in the entries of Using‑data‑length‑vector.

Since DBCHCL does not parse the request string, it is the application’s responsibility to check whether the request string contains a USING row descriptor and then to set the using‑data appropriately. The maximum number of fields in the Teradata SQL USING row descriptor may be obtained using the DBCHQE SQL‑limits query.

 

IF the data...

THEN the application...

cannot contain nulls

sets Use Presence Bits to N in the DBCAREA.

can contain nulls

inserts bytes containing indicator bits at the front of the data string and sets Use Presence Bits to 'Y'. See “Use Presence Bits” on page 193.

The application does the following, depending on the setting:

  • N - Places the address of the string or of the first byte of presence bits, if any, in the data addressed by each vector entry of Using‑data‑pointer‑vector.
  • Y - Inserts a two‑byte length field in front of the presence bytes or data string, if there are no presence bytes, and place the address of the first byte of the two‑byte length field in the data addressed by each vector entry of Using‑data‑pointer‑vector. See “Variable Length Request” on page 205.
  • If there is no USING row descriptor in the request string, set Using‑data‑count to zero.