To start the demo program

Be sure the RDBMS data source is available and that all the non-Database Connectors™ environment variables required for your data source are set. To run the demo program, you'll need to notify your COBOL development run-time system that you will be interfacing to an RDBMS driver. You accomplish this by adding the following line to your ACUFH configuration file. (For information about the ACUFH configuration file, see the chapter Run-time Configuration.)


If you're running demo.cbl from the same directory in which you placed the XFD, you are ready to run. If the XFD (orderfile.xfd, created when you compiled the demo program) is in another directory, you will need to add the following line to the ACUFH configuration file:

XFD_PREFIX dir-containing-dictionary

Set any environment variables required for your specific RDBMS. For information on this, see the section Designating the Host Data Source or Designating the Host File System in the appendix specific to your particular RDBMS.

At this point, you run the demo program as usual.

You will see the following screen:

Demo screen

The demo program enables you to add, view, or change any of the rows (records) in the orders table. You can also view the source code for the demo program. Upon first execution, the program will create an empty orderfile table in your target database. You may then add records to the newly created table.

The available menu options are:

First View the first record in the file
Prev View the previous record in the sequence
Next View the next record in the sequence
Last View the last record in the file
Delete Remove the order that is being displayed from the database
Search     Enter the order number of the order to be viewed
Add Resets the record to its initial state and increments the order number, putting you into edit mode with the new data
Edit Allows you to add a record or modify the currently displayed record in the file
Help Displays a short description of the demo program
Quit Quit the demo program