IBM Books

Administrative API Reference

SQLCHAR

This structure is used to pass variable length data to the database manager.

Table 22. Fields in the SQLCHAR Structure
Field Name Data Type Description
LENGTH SMALLINT Length of the character string pointed to by DATA.
DATA CHAR(n) An array of characters of length LENGTH.

Language Syntax

C Structure



/* File: sql.h */
/* Structure: SQLCHAR */
/* ... */
SQL_STRUCTURE sqlchar
{
  short                  length;
  _SQLOLDCHAR            data[1];
};
/* ... */
 

COBOL Structure

This is not defined in any header file. The following is an example showing how it can be done:



* Replace maxlen with the appropriate value:
01 SQLCHAR.
49 SQLCHAR-LEN  PIC S9(4) COMP-5.
49 SQLCHAR-DATA PIC X(maxlen).


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]