Problem:
This example illustrates how to use COBOL syntax to create and access a Btrieve database.
Resolution:
INTRODUCTION
==========
This example illustrates how to use COBOL syntax to create and access a Btrieve database.
SOURCE FILES:
=========
Program Files Description
------------------- -----------------------------------------------------------
Create.cbl Example program that creates a Btrieve database.
Multiuser.cbl A Multi-user example program that retireves records in a Btrieve database.
REQUIREMENTS:
==========
You will need a 32bit version of Btrieve installed in order to use this example. Pervasive 7 was used to develop and test these example programs.
Both of the example programs need a directory to be created on your "C:" drive, C:\\BTR. The Create program will create a Btrieve database in this directory and the Multiuser program will retrieve records from this file. Both programs are compiled with the "idxformat"5"" compiler direcetive. This directive enables Btrieve support via the xfh2btr interface.
OPERATION:
========
You can check and Animate both programs within the NetExpress IDE to see how they work. Once the Btrieve database has been created you can open two NetExpress command prompts, navigate into the Debug directory for the project and enter the command:
run multiuser.int
Do this for each NetExpress command prompt and you can see how the database is shared and how the file status is set when a record is locked or not available. The Multiuser program does not attempt to cope with all possible file status codes.
REFERENCES:
========
NetExpress Bookshelf: NetExpress On-line Books > File Handling > Chapter 8 Btrieve
NetExpress Help: Click Find (tab) and type idxformat into text window 1, select IDXFORMAT in text window 2, select Compiler directives - alphabetical list in text list window 3 and click Display (button). Browse to the idxformat directive and click.
==========================================================
Keywords: demonstration, sample, example, demo, UsingBtrieve.zip
demo.ex
demo.ne
demo.se