O'Reilly logo

DB2® Universal Database for OS/390® Version 7.1 Certification Guide by Susan Lawson, Richard Yevich

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Host Variables and Host Structures

A host variable is a data item declared in the host language for use within an 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 that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required