Your AcuSQL® pre-compiler comes with several sample programs that demonstrate embedded SQL in a COBOL program. Use these sample programs to learn the basics of SQL concepts and syntax. In several places, a syntax statement appears. Given the variety of databases, this syntax statement is quite simplified. Full syntax statements can run pages in length. Refer to your database documentation or any of the commercially available SQL texts for more details of SQL concepts and syntax.
The sample programs on your distribution have been placed in different sub-directories for different data sources, for example Access, DB2, etc. Not all of the data sources will support all of the sample applications. The samples also differ in areas such as table creation syntax and date formats. Take the time to review the differences in these sample programs if you intend to write ESQL applications that run on multiple databases. If you data source is not explicitly listed in the examples, you may examine the various samples to find the one whose syntax most closely matches your target data source.
The following sample files are provided with AcuSQL:
|create.sqb||Loads sample data into database|
|select1.sqb||Simple SELECT using Working-Storage items|
|select2.sqb||Simple SELECT using a group item|
|select3.sqb||Working with CURSORs|
|update.sqb||Modifying data through a CURSOR|
The programs were compiled on a Windows using the following command in a Windows 2000 environment:
ccbl32 -ps filename.sqb
The program was then run by executing the following command: