Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   SQL Statements >

GET DESCRIPTOR

Use the GET DESCRIPTOR statement to read from a system descriptor area.

Use this statement with ESQL/C.

Syntax

Read syntax diagramSkip visual syntax diagram>>-GET DESCRIPTOR--+-descriptor_var-+--------------------------->
                   '-'descriptor '--'
 
>--+-total_items_var-- =--COUNT----------------------------------+-><
   |                          .-,------------------------------. |
   |                          V                                | |
   '-VALUE--+-item_num_var-+----| Described Item Information |-+-'
            '-item_num-----'
 
Described Item Information:
 
|--field_var-- =--+-+-TYPE------+-----------------------+-------|
                  | +-LENGTH----+                       |
                  | +-PRECISION-+                       |
                  | +-SCALE-----+                       |
                  | +-NULLABLE--+                       |
                  | +-INDICATOR-+                       |
                  | +-NAME------+                       |
                  | +-DATA------+                       |
                  | +-IDATA-----+                       |
                  | +-ITYPE-----+                       |
                  | '-ILENGTH---'                       |
                  |  (1)    (2)                         |
                  '---------------+-EXTYPEID----------+-'
                                  +-EXTYPENAME--------+
                                  +-EXTYPEOWNERNAME---+
                                  +-EXTYPELENGTH------+
                                  +-EXTYPEOWNERLENGTH-+
                                  +-SOURCEID----------+
                                  '-SOURCETYPE--------'
 
Notes:
  1. Informix extension
  2. Dynamic Server only

Element Description Restrictions Syntax
descriptor Quoted string that identifies a system-descriptor area (SDA) System-descriptor area must already have been allocated Quoted String
descriptor_var Variable that stores descriptor value Same restrictions as descriptor Language specific
field_var Host variable to receive the contents of a field from an SDA Must be of type that can receive value of a specified SDA field Language specific
item_num Unsigned ordinal number of an item described in the SDA 0 ≤ item_num ≤ (number of item descriptors in the SDA) Literal Number
item_num_ var Host variable storing item_num Must be an integer data type Language specific
total_items_var Host variable storing the number of items described in the SDA Must be an integer data type Language specific

Usage

Use the GET DESCRIPTOR statement to accomplish any of the following tasks:

With Dynamic Server, you can use GET DESCRIPTOR after you describe EXECUTE FUNCTION, INSERT, SELECT, or UPDATE statements with the DESCRIBE ... USING SQL DESCRIPTOR statement.

With Extended Parallel Server, you can use GET DESCRIPTOR after you describe EXECUTE PROCEDURE, INSERT, or SELECT statements with the DESCRIBE ... USING SQL DESCRIPTOR statement.

The host variables that you reference in the GET DESCRIPTOR statement must be declared in the BEGIN DECLARE SECTION of a program.

If an error occurs during the assignment of a value to any specified host variable, the contents of the host variable are undefined.

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]