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

SET DESCRIPTOR

The SET DESCRIPTOR statement sets values in a system-descriptor area (SDA). Use this statement with ESQL/C.

Syntax

Read syntax diagramSkip visual syntax diagram>>-SET DESCRIPTOR--+-descriptor_var-+--------------------------->
                   '-'descriptor '--'
 
>--+-COUNT=-+-total_items_var-+----------------------------+---><
   |        '-total_items-----'                            |
   |                          .-,------------------------. |
   |                          V                     (1)  | |
   '-VALUE--+-item_num_var-+----| Item Descriptor |------+-'
            '-item_num-----'
 
Notes:
  1. See page Item Descriptor

Element Description Restrictions Syntax
descriptor String that identifies the SDA to which values are assigned System-descriptor area (SDA) must be previously allocated Quoted String,
p. Quoted String
descriptor_var Host variable that stores descriptor Same restrictions as descriptor Language specific
item_num Unsigned integer that specifies ordinal position of an item descriptor in the SDA 0 < item_num ≤ (number of item descriptors specified when SDA was allocated) Literal Number, p. Literal Number
item_num_var Host variable that stores item_num Same restrictions as item_num Language specific
total_items Unsigned integer that specifies how many items the SDA describes Same restrictions as item_num Literal Number, p. Literal Number
total_items_var Host variable that stores total_items Same restrictions as total_items Language specific

Usage

The SET DESCRIPTOR statement can be used after you have described SELECT, EXECUTE FUNCTION, EXECUTE PROCEDURE, ALLOCATE DESCRIPTOR, or INSERT statements with the DESCRIBE ... USING SQL DESCRIPTOR statement.

SET DESCRIPTOR can assign values to a system-descriptor area in these cases:

If an error occurs during the assignment to any identified system-descriptor fields, the contents of all identified fields are set to 0 or NULL, depending on the data type of the variable.

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