Callable File Handler (ExtFH) | Handling Btrieve Files |
UNIX:
On UNIX systems you can access C-ISAM files. This chapter describes the
modules available for handling C-ISAM files.
On UNIX systems, the RTS uses a version of the C-ISAM file handler that has been modified to fulfill this COBOL system's record locking requirements. Note that the format of files created using the modified C-ISAM file handler is identical to the format of files created using the standard C-ISAM file handler.
This version of C-ISAM is embedded in the mfisam.o module, found in the COBOL library libcobol.a. You cannot use this modified version of C-ISAM except from either a COBOL program that uses the standard COBOL file handling syntax, or a program that uses the Callable File Handler interface.
If you have access to a standard version of C-ISAM, you might want to use that in place of the modified version supplied with this COBOL system. An object module, fhix.o, is supplied with this system in the COBOL library libcobol.a that provides an interface to the standard C-ISAM.
To link the standard C-ISAM with a COBOL program:
You must specify the +l flag: if you specify the normal library inclusion flag -l, the standard C-ISAM libraries are not included in the executable file.
fhix.o contains the necessary external references to the C-ISAM libraries to ensure that they are included in the resulting executable file, instead of the modified libraries supplied with this COBOL system.
You can also build a version of Animator that has your own version of C-ISAM linked to it. However, if you do this, you cannot animate your programs with the anim command. Instead, you must run them with the A RTS switch set.
Examples
cob -x prog1.cbl prog2.cbl prog3.cbl
compiles and links prog1.cbl, prog2.cbl and prog3.cbl with the modified version of C-ISAM supplied in libcobol.a with this COBOL system.
cob -x prog1.cbl prog2.cbl prog3.cbl -m ixfile=cixfile +l isam
compiles and links prog1.cbl, prog2.cbl and prog3.cbl with the standard version of C-ISAM found in libisam.a.
cob -xo rts32 -e "" -m ixfile=cixfile +l isam
outputs an RTS that you can use to run intermediate and unlinked native code files with the standard version of C-ISAM. For example, to run the intermediate code file prog1.int using the standard C-ISAM libraries, enter:
rts32 prog1.int
You should be aware of the following differences between the standard C-ISAM libraries and the modified version supplied with this COBOL system:
Additionally, the modified C-ISAM supports the following functionality, that the standard C-ISAM does not:
C-ISAM4 is included in this COBOL system to provide compatibility for programs that previously used C-ISAM4.
This version of C-ISAM4 is embedded in the mfisamv4.o module, found in $COBDIR/src/mfisamv4.
You can access C-ISAM4 from a COBOL program that uses either the standard COBOL file handling syntax or the Callable File Handler.
To use C-ISAM4, you must re-link the RTS with the mfisamv4.o module. When creating an executable file, you must also link this to the mfisamv4.o module.
C-ISAM4 supports the standard C-ISAM variable length file functionality, but not from COBOL syntax.
C-ISAM5 is included in this COBOL system to provide compatibility for programs that previously used C-ISAM5.
This version of C-ISAM5 is embedded in the mfisamv5.o module, found in $COBDIR/src/mfisamv5.
You can access C-ISAM5 from a COBOL program that uses either the standard COBOL file handling syntax or the Callable File Handler.
To use C-ISAM5, you must relink the RTS with the mfisamv5.o module. When creating an executable file, you must also link this to the mfisamv5.o module.
C-ISAM5 supports the standard C-ISAM variable length file functionality, but not from COBOL syntax.
Copyright © 1999 MERANT International Limited. All rights reserved.
This document and the proprietary marks and names
used herein are protected by international law.
Callable File Handler (ExtFH) | Handling Btrieve Files |