Host Variables and Host Structures

A host variable is a data item declared in the host language for use within a SQL statement. Using host variables, you can

  • Retrieve data into the host variable for your application program's use.
  • Place data into the host variable to insert into a table or to change the contents of a row.
  • Use the data in the host variable when evaluating a WHERE or HAVING clause.
  • Assign the value in the host variable to a special register, such as CURRENT SQLID and CURRENT DEGREE.
  • Insert null values in columns using a host indicator variable that contains a negative value.
  • Use the data in the host variable in statements that process dynamic SQL, such as EXECUTE, PREPARE, and OPEN.

A host structure is a group of host variables ...

Get DB2® Universal Database™ for OS/390™ v7.1 Application Certification Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.