DTW_SAVE_TABLE_IN

AIX HP-UX Linux OS/2 OS/390 OS/400 PTX SUN Win NT
X X X X X X X X X

Purpose

Identifies a table variable that the SQL language environment uses to store table data from a query. This table can then be used later, for example, in a REXX program that analyzes table data.

Specify the value of this variable using a DEFINE statement or with the @DTW_ASSIGN() function.

Values

DTW_SAVE_TABLE_IN="table_name_var"

Table 14. DTW_SAVE_TABLE_IN Values
Values Description
table_name_var The name of a table for the SQL language environment to store table data from a query.

Examples

Example 1: A previously-defined table variable used in a REXX call

%DEFINE theTable = %TABLE(2)
%DEFINE DTW_SAVE_TABLE_IN = "theTable"
 
%FUNCTION(DTW_SQL) doQuery() {
SELECT MODNO, COST, DESCRIP FROM EQPTABLE
WHERE TYPE='MONITOR'
%}
 
%FUNCTION(DTW_REXX) analyze_table(myTable) {
  %EXEC{ anzTbl.cmd %}
%}
 
%HTML(doTable) {
@doQuery()
@analyze_table(theTable)
%}

A REXX FUNCTION block calls the REXX program anzTbl.cmd, which uses the table variable theTable to analyze data in the table. The variable theTable was returned from a previous SQL function call.


[ Top of Page | Previous Page | Next Page | Index ]