Compiling and Running the Demo Program

Perform the following steps to compile and run:

  1. Compile using the applicable command line:

    Windows: ccbl32 -Fx -o demo demo.cbl

    UNIX: ccbl -Fx -o demo demo.cbl

    This compiles the program and generates the ACUCOBOL-GT data dictionary orderfile.xfd. The runtime system will use this data dictionary to map RDBMS data types to COBOL data types.

  2. Verify the runtime by entering the applicable command:

    Windows: wrun32 -vv

    UNIX: runcbl -vv

    Be sure that the version information you receive references your Acu4GL product.

  3. Notify the ACUCOBOL-GT runtime system that you are interfacing to an RDBMS driver. You accomplish this by adding the following line to your runtime configuration file or to the machine's environment:

    If you're running demo.cbl from the same directory where you placed the ACUCOBOL-GT data dictionary, you are ready to run. If the data dictionary (orderfile.xfd, created when you compiled the demo program) is in another directory, you will need to add the following line to the cblconfig configuration file:

    XFD_PREFIX dir-containing-dictionary  
  4. Set any environment variables required for your specific Acu4GL product. See the Designating the Host Data Source or Designating the Host File System topic in the Appendix specific to your particular RDBMS.
  5. run the demo program by entering the applicable command:.

    Windows: wrun32 -c config demo

    UNIX: runcbl -c config demo

Depending on your system, you will see either a character or window based version of the program.

The demo program enables you to view or change any of the rows (records) in the orders table.

You can also view the source code for the demo program from the Options Menu. Selecting View Program will start the debugger and display the source code. Be sure you compiled the program with -Zd and executed it with -d.