HP 3000 Manuals

Btrieve Call Conversion Module [ COBOL/HP-UX Operating Guide for the Series 700 and 800 ] MPE/iX 5.0 Documentation


COBOL/HP-UX Operating Guide for the Series 700 and 800

Btrieve Call Conversion Module 

This COBOL system provides a call conversion module to enable Btrieve to
call EXTFH, where: 

EXTFH         is the external file handler for this COBOL system.

Btrieve       is the file handling system from Novell Inc.  For further
              details of Btrieve, you should consult your Novell
              documentation.

The call conversion routine is named BTR2XFH which takes Btrieve format
I/O operations and converts them to equivalent EXTFH format calls.

The following sections describe the call converter, how you invoke it and
compatibility between EXTFH and Btrieve I/O operations.

BTR2XFH Call Converter 

The BTR2XFH call converter, for Btrieve to EXTFH call conversions, takes
Btrieve I/O calls and converts them to EXTFH format I/O operations

BTR2XFH and EXTFH replace the modules supplied by Novell.  All of the
calls that would normally go to the Btrieve record manager are passed to
the call converter module and are then passed to the COBOL file handling
system.

The entry point into the module is _BTRV and requires the same seven
parameters that would normally be passed from a COBOL application to a
Btrieve record manager.

The converter is designed to replace the COBOL interface module supplied
with Novell's Btrieve Developer's Kit that would normally be linked to
the application.

If you have Fileshare V2, supplied in an add-on product from Micro Focus,
then you use FHREDIR instead of EXTFH. FHREDIR is the client module of
the Fileshare system which sends I/O requests to EXTFH on the server for
server based files and a local copy of EXTFH for local files.  BTR2XFH
calls FHREDIR when it needs to perform EXTFH I/O. If you do not have
Fileshare active, then FHREDIR calls a local copy of EXTFH.

The call interface to FHREDIR is exactly the same as EXTFH and its use is
transparent.  The sections describing the conversion module refers to
calling EXTFH even though it is FHREDIR that is called.

Compatibility 

The majority of file options performed using Btrieve operate in exactly
the same way when EXTFH is used.  However, due to the underlying
differences between the two systems, there are instances when the
behavior and characteristics of EXTFH are different to those of Btrieve.

The areas in which EXTFH behaves differently from Btrieve are:

     Key lengths
     Key types
     Record size
     Page size
     Indices
     Data compression
     File operations
     Btrieve Stat operation

These differences are described in the following sections.

Key Lengths.   

The total length of a single key in EXTFH cannot exceed 1016 bytes.  This
is the sum of the lengths of any component making up a split or segmented
key.  The total number of key components in a file cannot exceed 255.

Key Types.   

The following points apply to keys when using BTR2XFH:

   *    

       EXTFH has only one type of key.  This is the equivalent of the
       Btrieve format string and on a Btrieve Stat operation, 
       all of the keys are returned as having string format.

   *   Keys are stored in ascending order and are always modifiable.

   *   When performing comparisons, the keys are compared on a byte by
       byte basis from left to right.

   *   Null keys are supported, although the NULL character is not
       returned on a Btrieve Stat operation.

   *   The key attributes, Duplicates and Segmented are supported.

Record Size.   

The maximum record size with EXTFH is 62 Kilobytes.

Page Size.   

EXTFH has no concept of page size, so page size parameters are not
required.  Page size is not returned on a Btrieve Stat operation.

Indices.   

Only permanent indices are supported.  It is not possible to add or
delete indices to a file once you have created it.

Data Compression.   

Creating a file with data compression causes data and key compression 
to be used on the file.

File Operations.   

The following Btrieve file operations are supported by EXTFH: 

     Abort Transaction
     Begin Transaction
     Create
     Delete
     End Transaction
     Open
     Insert
     Get Direct
     Get Equal
     Get Next
     Get Previous
     Get First
     Get Last
     Get Greater
     Get Greater or Equal
     Get Less than
     Get Less than or Equal
     Get Key
     Get Position
     Get Directory
     Step Next
     Step Previous
     Step First
     Step Last
     Set Directory
     Stat
     Unlock
     Update

The locking and key-only operations are also supported.

The Stat Operation.   

The bits set in file flags and the fields set in the file specification
in EXTFH differ from those set when the Btrieve Stat operation is used.
The following lists the bits and fields set when using the Stat
operation.  All other flags and fields are returned set to zero. 

   *   Bits set in the file flags:

            variable length record
            data compression

   *   Bits set in the key flags:

            duplicates allows
            key has another segment

       The modifiable flag is always set.

   *   Fields set in the file specification:

            record length
            number of indices
            file flags (see above)



MPE/iX 5.0 Documentation