


ODBC programs retrieve data through Structured Query Language (SQL). Although many Windows applications let you use Microsoft Query to generate SQL statements transparently, others require you to generate the SQL yourself. In some instances, you may want to generate your own SQL commands even for applications that could otherwise use MS Query. For example, you may want to generate a complex set of instructions for a custom query and display the result in a formatted dialog box. MS Query does not let you perform these functions.
This chapter gives you the information you need to write your own macros or programs for accessing COBOL data. It describes what to consider when writing macros, which SQL commands are supported by AcuODBC, and which application-specific guidelines you should follow. It also describes how to run sample macros in the three most popular Windows applications--Word, Excel, and Access.
To understand the concepts in this chapter, you must have a minimum knowledge of the BASIC language, because most Windows application languages have a BASIC-like syntax. Before you begin, you should verify that the application from which you want access to COBOL data is ODBC-enabled.
Caution: Macro programming is an advanced application function. Before you attempt to write macros, be sure to familiarize yourself with each macro command and its side-effects. To safeguard your system, we recommend that you perform all macro programming functions on a dedicated development machine.