Previous Topic: Defining Bulk StructuresNext Topic: Including SQL Communication Areas


Referring to Host Variables

What You Can Do

CA IDMS supports references to host variables in SQL statements. The host variable name must be prefixed with a colon (:).

Note: For more information, see Data Manipulation with SQL.

CA IDMS also supports references to:

Qualifying host variable names

You can use the group name to qualify the element name of a host variable.

For example, assume these host variable definitions:

DECLARE 1 EMP,
         2 HIRE_DATE
 .
 .
 .
DECLARE 1 MGR,
         2 HIRE_DATE
 .
 .
 .

You can qualify HIRE_DATE as in this example:

EXEC SQL
  SELECT...
    INTO :EMP.HIRE_DATE ;

Subscripted Variable Names

A CA IDMS extension of the SQL standard supports host variable arrays for use in bulk processing. By further extension of the SQL standard, CA IDMS supports reference to a subscripted variable in a host variable array.

All of the following are valid host variable references: