Demonstration Applications

Visual COBOL provides a number of demonstration applications or programs for the DB2 ECM.

A number of DB2 ECM sample programs are supplied. The source files for these samples are located in $COBDIR/demo/db2.

Each sample program comes with a progName.txt file to explain how to use the program.

Shows the syntax variants for connecting to and disconnecting from a DB2 database using Type 1 CONNECTs that IBM DB2 LUW supports.
A simple example of using both singleton SELECT and cursor-based FETCH statements with IBM DB2 LUW.
A simple example of using dynamic SQL with IBM DB2 LUW, performing a variety of SQL operations. If this program was written as a STATIC SQL program, it would have to be broken apart into two programs, since static SQL requires that the table exists beforehand or it would cause a Compiler error.
Shows how LOB LOCATOR and VALUES functions to retrieve LOB data from DB2 LUW.
Shows how to use EXEC SQL WHENEVER statements for error handling, and the DB2(MSGAREA) Compiler directive to specify a COBOL variable for retrieving error message text larger than the 70 bytes provided in SQLERRMC.