Using Embedded SQL/COBOL sample programs

Embedded SQL includes sample programs that demonstrate typical Embedded SQL applications. Sample programs are located in %SYBASE%\%SYBASE_OCS%\sample\esqlcob.

A README file in the same directory contains instructions for building and executing the sample programs and notes about using them. The COBOL.pco file defines an Adaptive Server login name and password. Update the login information in this file before compiling the sample programs.

Sample programs demonstrate specific Embedded SQL/COBOL functionality. These programs are designed as guides for application programmers, not as Embedded SQL/COBOL training aids. Read the descriptions at the top of each source file and examine the source code before attempting to use the sample programs.

NoteThese simplified programs are not intended for use in a production environment. Programs written for a production environment need additional error handling.

To run the Embedded SQL/COBOL sample programs, make sure these environment variables are set:

You need to access an Adaptive Server on which the pubs2 sample database is installed. See the Adaptive Server Enterprise Installation Guide for information about installing the pubs2 database.

Before you precompile the programs, replace the user name and password with values that are valid for your Adaptive Server. Comments in the programs show where to make the changes.

NoteBefore the sample programs produce any results, you may need to press Return.