|  | Programming Guide |        | 
Generates a data structure used in SELECT statement generation
#include <tmusubs.h>int dm_gen_sql_info(int type, char *cursor_name);
type- Type of
SELECTto generate, specified by one of these constants:SELECT
VALIDATE
CHECK_PKEY
cursor_name- Name of the cursor associated with the SQL statement.
- 0 Success.
dm_gen_sql_infogenerates a data structure associated withSELECTstatements. The type isSELECTwhen the function is called as the result of the transaction commandsSELECTandVIEW. ThetypeisVALIDATEwhen the function is called as a result of processing a validation link. The type isCHECK_PKEYwhen the function is called as a result of checking for duplicate key values before inserting a new row or updating the primary key columns.
int gen_select (cursor)
char *cursor;
{
int retcode;
retcode = dm_gen_sql_info(SELECT, cursor1);
...
return retcode;
}