Application Development Guide

Command Line Processor Samples


Table 51. Command Line Processor (CLP) Sample Programs.
Sample File Name File Description
const.db2 Creates a table with a CHECK CONSTRAINT clause.
cte.db2 Demonstrates a common table expression. The equivalent sample program demonstrating this advanced SQL statement is tabsql.
flt.db2 Demonstrates a recursive query. The equivalent sample program demonstrating this advanced SQL statement is recursql.
join.db2 Demonstrates an outer join of tables. The equivalent sample program demonstrating this advanced SQL statement is joinsql.
stock.db2 Demonstrates the use of triggers. The equivalent sample program demonstrating this advanced SQL statement is trigsql.
testdata.db2 Uses DB2 built-in functions such as RAND() and TRANSLATE() to populate a table with randomly generated test data.
thaisort.db2 This script is particularly for Thai users. Thai sorting is by phonetic order requiring pre-sorting/swapping of the leading vowel and its consonant, as well as post-sorting in order to view the data in the correct sort order. The file implements Thai sorting by creating UDF functions presort and postsort, and creating a table; then it calls the functions against the table to sort the table data. To run this program, you first have to build the user-defined function program, udf, from the C source file, udf.c.


[ Top of Page | Previous Page | Next Page ]