HP 3000 Manuals

C-ISAM Programming Features [ 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

C-ISAM Programming Features 

The Run-Time System uses a version of C-ISAM 
which 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.a which provides an interface between this COBOL system
and the standard C-ISAM. To link the standard C-ISAM with a COBOL
program, use 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 also specify the -m flag on the cob command line to map the
symbol "ixfile" onto the C-ISAM interface "cixfile".  cixfile.o contains
the necessary external references to the C-ISAM libraries to ensure that
they are included in the resulting executable file, in preference to the
Micro Focus modified libraries.

Note:    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.

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 Chapter 4 , Animating and Chapter 7 , Running 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 an RTS 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

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-ISAM does not support WRITE and REWRITE operations
       acquiring locks, but the modified C-ISAM does.

   *   The standard C-ISAM does not support the READ WITH NO LOCK
       operation; it treats this as a normal READ operation.  The
       modified C-ISAM does support this operation.

   *   The standard C-ISAM does 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 standard C-ISAM does not support the creation of data and
       index files in separate directories, but the modified C-ISAM does.
       Therefore, the "I" option of cobcap and the "&" option of logical
       file-name mapping using environment variables will not work with
       the standard C-ISAM.

   *   The modified C-ISAM has 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 does not support NODETECTLOCK functionality.

   *   The standard C-ISAM does not support multiple OPEN functionality.

   *   The standard C-ISAM does not support user configurable lock
       implementations.



MPE/iX 5.0 Documentation