Was this helpful?
Variable Declaration
EQUEL statements use host language variables to transfer data between a database and an application program. In addition, you can use host variables to specify the names of cursors, tables, views, and columns. You must declare host variables to EQUEL before you can use them in EQUEL statements. (If a variable is not used in an EQUEL statement, it does not need to be declared to EQUEL.) To declare a variable to EQUEL, precede the variable declaration with ##. For example,
## char employee, street, city, zipcode
The Embedded QUEL Companion Guide lists the data types acceptable to EQUEL and discusses conversion between host language and QUEL data types. EQUEL restricts you to these data types for variables you use in EQUEL statements.
EQUEL automatically converts between host and QUEL data of the same type (numeric or character). However, EQUEL does not convert across data types. For example, you cannot ask EQUEL to return a numeric value in a host character variable. To convert data types, use the QUEL data type conversion functions. For details, see Data Type Conversion Functions.
Last modified date: 08/14/2024