Previous Topic: Description of Host VariablesNext Topic: Return Codes from ADDRESS SQL Instructions


Specifying Stem Names

As illustrated by the example shown in Requesting Data From a Table in this chapter, for SQL statements that generate REXX variables, you can specify a stem name. For example, to fetch information about user names from the TABLE table and insert it into a series of variables with the stem USER_NAME, use an instruction like the following:

ADDRESS SQL
  "SELECT NAME INTO :USER_NAME FROM TABLE"

Executing this statement produces variable USER_NAME.0, which contains the number of variables produced by this instruction; and variables named USER_NAME.1 through USER_NAME.n, which contain user names taken from the database of the Relational Data Framework.