The ACUCOBOL-GT MPE file system interface

On the HP e3000, ACUCOBOL-GT uses the MPE file system by default for KSAM, relative, and sequential files. ACUCOBOL-GT also comes with its own indexed file system called Vision. See Selecting a File System for more information on selecting a file system.

The MPE file system interface routines are linked into the runtime system and are automatically invoked whenever you execute your programs. This method allows for improved portability of your application because no file system-specific commands need to be embedded in your COBOL code.

Depending on file system version, Vision and KSAM use either one or two disk files for storage. Vision Version 3 files are stored in a single disk file. This can simplify system maintenance and reduce the size of directories. Vision Version 4 and 5 files use a dual-file format, which facilitates the management of very large files. One disk file, or segment, contains the data records, and the other segment contains indexing information. As each segment approaches the configurable segment size limit, Vision automatically generates additional segments to hold the data or index information. Like Vision 4 and 5, KSAM/3000 files are stored in two disk files–one for indexes and one for data records. Like Vision Version 3, KSAM XL and KSAM64 use a single disk file. KSAM file size limits are fixed at the time of file creation. The default KSAM file size is limited to 10,000 records. A different file size limit can be established when the file is created by setting the file size parameter in the ASSIGN clause. This is an HP COBOL extension to the ASSIGN clause that requires compilation for HP compatibility -Cp).

KSAM/3000 supports variable-length records. KSAM XL and KSAM64 support only fixed length records. Vision supports variable-length records, and also record locking, data compression, and data encryption.

The ACUCOBOL-GT MPE file system interface creates KSAM XL files by default. A KSAM/3000 file is created if variable-length records are specified in the File Descriptor (FD). The KSAM file is created with the name specified in the ASSIGN clause. The name is limited to eight characters. The KSAM/3000 index file has the same name as the data file but with a 'K' appended to the end (if the ASSIGN name is eight characters, only the first seven are used and a 'K' is appended to the index file name).