AcuODBC User's Guide
Version 6.0

5.2.1 COBOL vs. Application Language

Your goals determine whether it's best to write your custom query in COBOL or in the application itself. Consider the following example:


Your Vision file contains the names and addresses of clients and a list of the monthly revenues coming from these clients. You want to create a letter containing a summary of this data, with individual revenues displayed and totaled in a table. The tool you chose to create this letter is Microsoft Word for Windows.

The Vision file lacks an important element: the total of the revenues. You can compute this total in one of two ways.

Solution A: COBOL

One option is to create another Acucorp Vision work file containing the missing information in addition to all the other data necessary to fill out the letter. To do this, you write a COBOL program suitable for this purpose. All the computational work is done in COBOL.

This solution is especially good for people who are not very experienced with Word Basic or the application language.

Solution B: Application Language

Another option is to read the Vision file into the Windows application as it is, and then compute the total using some feature of this application.

This solution is faster, in that it allows you to accomplish your goal of printing the letter faster. But solution B is possible only with some tools. For example Microsoft Word's mail merge function doesn't allow you to modify or create new variables during the data processing. To perform these functions, you would need to write a program in WordBasic or write queries in Access to be used as part of the merge.

Most solutions will have both advantages and disadvantages. Your experience will dictate the best solution for a given set of circumstances.

Acucorp, Inc.
Voice: (800) 262-6585 (U.S.A. and Canada)
Voice: (858) 689-4500
Fax: (858) 689-4550

Please share your comments on this manual
or on any Acucorp documentation with the
Acucorp Communications Department.
1988-2003 Acucorp, Inc.
All rights reserved.