Host variables allow SQL statements to use EGL variables.
SQL statements never appear outside of another language, called the host language (in this case EGL). Because SQL is a distinct language from EGL, it does not automatically have access to the variables declared in your EGL program. As in other languages that host SQL, you can use host variables to give SQL this access.
A host variable has the same name as a variable in the host language, with an additional initial colon character (:). The initial colon indicates that the variable is defined in the host language (EGL) and not SQL.
myCustomer with customerNumber as
the key field and customerBalance as a data field,
you can update the balance field using information from your database.
The code might look like the following sample:SELECT customer_balance
INTO :myCustomer.customerBalance
FROM Customer
WHERE customer_number = :myCustomer.customerNumberThe names customer_balance and customer_number refer
to columns in the database table Customer; :myCustomer.customerBalance and
:myCustomer.customerNumber are host variables (variables
or fields that SQL looks for in your EGL program).