C-ISAM (UNIX only) [ Micro Focus COBOL System Reference, Volume 1 ] MPE/iX 5.0 Documentation
Micro Focus COBOL System Reference, Volume 1
C-ISAM (UNIX only)
On UNIX systems, the run-time system uses a version of C-ISAMwhich has
been modified to meet the needs of this COBOL system's record locking
requirements.
This version of C-ISAM is embedded in the mfisam.o module, found in the
COBOL library libcobol.a. You cannot access or use this modified version
of C-ISAM except from a COBOL program which uses either the standard
COBOL file handling syntax, or a call interface program that uses the
Extfh 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, cixfile.o, is supplied with this COBOL system in the
archive libcobol.awhich provides an interface between this COBOL system
and the standard C-ISAM.
To linkthe standard C-ISAM with a COBOL program:
1. Specify the +l flag on the cob command line to specify that cob is
to use the standard C-ISAM library, which is probably named
libisam.a.
You must specify the +l flag on the cob command line. If you
specify the normal library inclusion flag -l, the standard C-ISAM
libraries are not included in the executable file.
2. You must also specify the -m flag on the cob command line to map
the symbol "ixfile" onto the C-ISAMinterface "cixfile".
cixfile.ocontains the necessary external references to the C-ISAM
libraries to ensure that they are included in the resulting
executable file, in preference to the modified libraries supplied
with this COBOL system.
You can also build a version of Animator which has your own version of
ISAM linked to it, in which case, you cannot animate your programs with
the anim command. Instead, you must run them with the A run-time switch
set. See the chapters Animator and Running in your COBOL System
Reference for further details of this command and run-time switch.
Consider the following 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 a run-time system which 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
Standard C-ISAM and Modified C-ISAM Differences
You should be aware of the following differences between the standard
C-ISAM libraries and the modified version supplied with this COBOL
system:
* The standard C-ISAMdoes not notify the COBOL program if a record
is locked unless the program is trying to acquire a lock either
implicitly or explicitly. The modified C-ISAM always notifies of
a locked record regardless of whether an attempt to acquire a lock
is made or not.
* The modified C-ISAMhas a maximum record length of 32K bytes. The
standard C-ISAM imposes a lower maximum record length - consult
your C-ISAM documentation for specific details.
* The file-naming convention
of the standard C-ISAM is to append ".dat" to the data file-name
and ".idx" to the index file-name. Thus, the file testfile
becomes testfile.dat and testfile.idx. The modified C-ISAM uses
testfile and testfile.idx.
* The standard C-ISAM supports collating sequences. The modified
C-ISAM does not.
Additionally, the modified C-ISAM supports the following functionality,
whereas the standard C-ISAM does not:
* READ WITH NO LOCK operation; it treats this as a normal READ
operation.
* Creation of data and index files in separate directories.
Therefore, the "&" option of logical file-name mapping using
environment variables will not work with the standard C-ISAM.
* Long file-names.
* NODETECTLOCK functionality.
* WRITE and REWRITE operations acquiring locks.
* Multiple OPEN functionality.
* User configurable lock implementations.
* Configurable node sizes.
* ANSI'74 or ANSI'85 file statuses or the file statuses used by this
COBOL system.
* File-name mapping.
* SKIPLOCK and RETRYLOCK operations. * Sequence checking.
* Special action codes.
* START LESS or START LESS OR EQUAL functionality.
* Collating sequences are not supported by this COBOL system.
C-ISAM 4
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.omodule, found in
$COBDIR/src/mfisamv4.
You can access C-ISAM4 from a COBOL program which uses either the
standard COBOL file handling syntax or a call interface program that uses
the Extfh interface.
To use C-ISAM4, you must relink the run-time system 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 file length functionality
but not from COBOL syntax.
MPE/iX 5.0 Documentation