Overview [ 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
Overview
This chapter describes both the call interface of the file handler and
the special features available.
The file handler is used automatically by this COBOL system for all I/O
operations on all files.
You can create an RTS that is linked to your file handler(s) rather than
the default file handler(s) supplied with this COBOL system. The default
file handlers for the various types of file organization and record
format are as follows:
---------------------------------------------------------------------
| | |
| File Type | Default File Handler |
| | |
---------------------------------------------------------------------
| | | |
| | Fixed Length Records | Variable Length |
| | | Records |
| | | |
---------------------------------------------------------------------
| | | |
| line-sequential | lsfile | lsfilev |
| | | |
---------------------------------------------------------------------
| | | |
| sequential | sqfile | sqfilev |
| | | |
---------------------------------------------------------------------
| | | |
| indexed | ixfile | ixfilev |
| | | |
---------------------------------------------------------------------
| | | |
| relative | rlfile | rlfilev |
| | | |
---------------------------------------------------------------------
The file handlers you link to the RTS in preference to any of the default
file handlers shown here must conform to the format of the call interface
described in this chapter.
The existence of a file handler creates two useful opportunities:
* The file handler can be called by user applications to perform
specialized file processing outside the normal program
environment.
* The file handler can be replaced with a user-written file handler
to perform specialized file processing within the normal program
environment.
Using the interface described here, you can access the file handler
directly using the CALL statement in your program. You can handle all
I/O without COBOL I/O syntax, though we do not recommend this for normal
file handling. This facility can also be used from other languages,
allowing access to COBOL format files from C, for example.
The power of the file handler used in this way allows the creation of
dynamic file processing tools, as well as sophisticated database type
applications.
Features of the Callable File Handler
This section details a number of the features of the Callable File
Handler, including:
* Opening a file more than once
* Accessing the FCD (the FCDREG directive)
* Sparse keys
* Fast processing of duplicate keys
* Creating a new index
* File status conversion
* Data Compression
* Relative Byte Addressing
Most of the other features can be used by setting up your own file
definitions and calling the file handler directly, or by using the
FCDREG compiler directive to gain access to the definitions of files
defined using COBOL syntax.
MPE/iX 5.0 Documentation