If you are not using OpenESQL, or you need to maintain compatibility with other ESQL preprocessors, you can skip this section. Otherwise, we recommend that you use the SQL TYPEs described in this section wherever possible.

Experience has shown that manipulating SQL data that involves date/time or binary data can be complicated using normal COBOL host variables, and that traditional techniques for handling variable-length character data can also be problematic. We have therefore extended OpenESQL to make it easier to declare host variables that more closely reflect the type of data that the SQL table stores via the SQL TYPE function. This allows more applications to be built using static rather than dynamic SQL syntax.

The following data types can be used as host variables with the SQL TYPE function: