Host variables in SQL statements in the SQL Query Builder

You can use host variables in SQL statements in the SQL Query Builder to represent a value that is substituted at run time.

The host variable syntax is a symbol followed by a string, for example, :COMPANYNAME . The symbol that is used depends on the syntax that IMS™ uses to denote variables.

You can use a host variable in an SQL statement in place of an expression. You can use the Expression Builder wizard to create a host variable, or you can type a host variable in place of an expression in the SQL Query Builder panes.

When you run the statement in the SQL Query Builder, you are prompted to substitute a value of the appropriate type for the host variable.

After you run the statement, you can see what parameters were passed on the Parameters page in the SQL Results view.




© Copyright IBM Corporation 2010, 2017.