Previous Topic Next topic Print topic


COBES0130 Host variable host-var.group-var is part of a group variable expansion that is not supported in this type of SQL statement.

The EXEC SQL statement in which the host variable is included does not support group variable expansion.

Resolution:

Scenario 1: Group variable is valid
In the case where the group variable is valid, compile with SQL(GEN-HV-FROM-GROUP). For example, the following statement includes a valid group variable:
EXEC SQL Select a into :HV1 where col_a IN (:group-var)
Scenario 2: Group variable is invalid
Redefine the group variable as an elementary host variable. For example:
01 GROUP-VAR.
     05 ELEM-VAR1 PIC X.
     05 ELEM-VAR2 PIC X.
01 ELGROUP-VAR PIC X(2) redefines GROUP-VAR.

Then code the EXEC SQL statement to use the elementary definition. For the above example, use this:

EXEC SQL Select a into :HV1 where col_a = :elgroup-var

Instead of this:

EXEC SQL Select a into :HV1 where col_a = :group-var
Previous Topic Next topic Print topic