Nonstop Database, HiRDB Version 9 UAP Development Guide

[Contents][Index][Back][Next]

Appendix C.1 Organization and contents of the Column Name Descriptor Area

Organization of this subsection
(1) Organization of the Column Name Descriptor Area
(2) Contents of the Column Name Descriptor Area

(1) Organization of the Column Name Descriptor Area

The following figure shows the organization of the Column Name Descriptor Area (SQLCNDA).

Figure C-1 Organization of the Column Name Descriptor Area

[Figure]

Note
Numbers in parentheses indicate length (in bytes).

#: SQLNAMEC is an array of variable-length character strings with a maximum length of 30 bytes. The array should be the same length as the SQLVAR array in the SQL Descriptor Area. For details about the size of the SQLVAR array, see B.1 Organization and contents of the SQL Descriptor Area.

(2) Contents of the Column Name Descriptor Area

The following table shows the contents of the Column Name Descriptor Area.

Table C-1 Contents of the Column Name Descriptor Area

Acquired information item Type of retrieval item Description
Retrieval item Column (without subscript specification) column-name
Column (with subscript specification) column-name [subscript]
Set function [Figure] [Figure] COUNT(*)
[Figure] [Figure] COUNT_FLOAT(*)
{[Figure] {[Figure] |[Figure] } function-name (column-name) | [Figure]{[Figure] |[Figure]} function-name (DISTINCT-column-name) | [Figure] [Figure]function-name ([Figure] EXP)}
Window function [Figure] [Figure] EXP(integer)
Value expression (including literal) [Figure] [Figure] EXP(integer)
WRITE specification [Figure] [Figure] EXP(integer)
ROW [Figure] [Figure] ROW
CALL statement's input ? parameter ? parameter routine's-parameter-name
CALL statement's output ? parameter
User-defined type configuration element Attribute attribute-name
CALL COMMAND statement's input ? parameter ? parameter Command name: COMMAND_NAME
WITH clause:
[Figure] First: WITH
[Figure] Subsequent: WITH (argument-number)
INPUT clause: INPUT
ENVIRONMENT clause: ENVIRONMENT
SERVER clause: SERVER
CALL COMMAND statement's output ? parameter ? parameter OUTPUT TO clause: OUTPUT
ERROR TO clause: ERROR
RETURN CODE TO clause: RETURN_CODE

Legend:
[Figure]: X'FF'
[Figure]: One space

Notes
  1. The ith element of the Column Name Descriptor Area stores column name information for the ith retrieval item.
  2. If a retrieval item is a column, the column name is assigned to the retrieval item from the beginning of the retrieval item. If the length of the column name, including subscripts, is greater than 30 bytes, the excess bytes of the column name are truncated.
    If a retrieval item is not a column, one or two spaces (indicated by [Figure] in the table) are set at the beginning of the retrieval item. If the column is greater than 30 bytes, X'FF' is set in byte 2. The symbol [Figure] in the table denotes the value X'FF'.
  3. Integer indicates the ordinal number of a retrieval item.
  4. For UNION[ALL] or EXCEPT[ALL], the contents of the retrieval item in the query specified first are set in the Column Name Descriptor Areas.
  5. If an AS column name is specified, the specified column name is set.
  6. The routine's parameter name is set only when the? parameter is specified independently in the CALL statement's argument. If a value expression including the? parameter is specified, SQLNAMEL is set to 0.
  7. If the retrieval item is a column of a derived table, the derived column list is omitted after the derived table, and the derived column has no column name in the query selection expression, [Figure]NONAME is set.