Product Documentation

FairCom ISAM API for C

Previous Topic

Next Topic

Command-Line Compile - Linux

This section explains the steps to compile and run the ISAM C tutorial from the Linux command line/command shell.

If the FairCom Database Engine is not already running on your machine, start the server. See Setting up the FairCom Database Engine.

Compiling

To compile the ISAM C tutorial from the Linux command line, follow these steps:

  1. CD into the proper folder:

    drivers/c.isam/tutorials/cmdline

  2. Execute make:

    >make

  3. If make works, it prints...

The ISAM tutorials are ready to run.

Type 'make run' to run the tutorials.

Running

Be sure the FairCom Database Engine is running.

To run the c-tree tutorials from the Linux command line, follow these steps from the same folder you compiled from:

  1. Type the following:

    >make run

  2. The make file will run the tutorial.
  3. A prompt will ask you to press <Enter> after the tutorial has run.

If you see a c-tree error, you can look it up in the Error Code Reference.

See the Troubleshooting section below for solutions to common problems.

When running, the tutorial should look similar to the text below:

INIT

Logon to server...

DEFINE

Open table...

MANAGE

Delete records...

Add records...

Display records...

1000 Bryan Williams

1001 Michael Jordan

1002 Joshua Brown

1003 Keyon Dooling

DONE

Close table...

Logout...

Press <ENTER> key to exit . . .

Note: On systems running a glibc version older than 2.17, the tutorials need to be linked with librt by adding -lrt to the SYSLIBS macro in the makefile. If you are running a system with glbic older than 2.17, edit the makefile and uncomment -lrt.

Troubleshooting

This section lists some of the errors that can occur when compiling and running these tutorials:

ERROR: Initialize(): InitISAMXtd()
isam_err = 133, isam_fil = 0, sysiocod = 0

The most common cause of this runtime error is that the FairCom Database Engine is not running. Remember that the c-tree evaluation license times out after 3 hours, so the server might have exited and needs to be re-started. See Setting up the FairCom Database Engine for details.

TOCIndex