Enabling and disabling the MPE interface

ACUCOBOL-GT's support for KSAM is enabled by default. However, if for some reason support has been disabled and you want to re-enable it, or if you want to disable support, you can include or remove it from the runtime by performing the following steps.

  1. Make a backup copy of your current runcbl file.
  2. Edit filetbl.c (in the LIB directory). In a text editor, look for the list of define statements. The list contains entries such as:
    #define USE_VISION   1
    #define USE_RMS      0
    #define USE_CISAM    0
    #define USE_BTRIEVE  0
    #define USE_INFORMIX 0
    #define USE_KSAM     1

    Set a value in the list to "0" (zero) to disable that system, or to "1" (one) to enable it. The file systems that are set to "1" are the ones you plan to link and use. Any or all may be enabled at the same time; the more systems you link, the larger your runtime system becomes. Only Vision and MPE KSAM, relative, and sequential files are supported on the HP e3000.

  3. Locate and edit the Makefile (in the LIB directory). In a text editor, add ksam.o to the FSI_SUBS definition. The line with FSI_SUBS should look like this:
    FSI_SUBS  =  ksam.o

    To remove support for KSAM, remove ksam.o from FSI_SUBS.

  4. Link the runtime system. Be sure that your current working directory is the lib subdirectory of your ACUCOBOL-GT directory.

    To link the runtime in the MPE/iX environment enter:

    :/usr/local/bin/make

    To link the runtime in the POSIX environment enter:

    make

    This compiles sub.c and filetbl.c, and then links the runtime.

  5. To specify MPE as the default file system, edit cblconfig (the runtime configuration file) and add the following line:
    DEFAULT_FILESYSTEM MPE

    You can override this default in your programs via the SET ENVIRONMENT statement or by setting the filename_HOST variable.

  6. Test the system.

    The interface is now in place. To ensure that ACUCOBOL-GT is writing and reading records via KSAM, move to the directory containing the sample program iobench. Create a temporary configuration file named temp.ttt. In this file, place one line:

    DEFAULT_FILESYSTEM MPE
    

    At the system prompt, type:

    :runcbl  "-v"
    :ccbl  "-x  -Cr  -Si  ACU  iobench.cbl"
    :runcbl  "-c  temp.ttt"

    This displays the version number of the interface and then compiles and executes a sample program that generates several file I/O activities.

    We use the file temp.ttt to prevent the runtime system from using your usual cblconfig file. This ensures that the iobench program creates its files in the current directory.