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.
These 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:
SYBASE – to the path of the Sybase installation directory (if it has not already been set).
SYBASE_OCS – to the home directory of Open Client and Open Server products. For example, OCS-15_0 is the home directory of Open Client and Open Server version 15.5 products.
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.
Before the sample programs produce any results, you
may need to press Return.