EAM is the access method for EAM files in BS2000 and has the following characteristics:
EAM files are not cataloged. As a result of this, no disk access is necessary when an EAM file is opened.
Each EAM file is automatically deleted when the job which opened it is terminated (temporary file).
Communication between EAM and the user takes place only via the EAM control block (MFCB = Mini File Control Block). No facilities exist for modifying this control block at OPEN time.
There is no label processing.
EAM works exclusively with public volumes (pubsets). No distinction is made between disks with and without PAM keys (K and NK disks).
The space requirements for the EAM routines and the runtimes for read and write accesses are less than for the standard access methods for cataloged files (UPAM, SAM, ISAM).
An EAM file can be processed only by the calling job, but one job may open and process several EAM files.
EAM is block-oriented and is based on blocks of 2048 bytes each. The system knows nothing about the record structure. For chained I/O, up to 16 sequential blocks may be transferred at one time.
If a program is restarted using RESTART-PROGRAM, all existing EAM files belonging to the job are erased.
EAM functions
The EAM functions are available after calling the EAM macro. The following are the basic EAM functions:
Function | Meaning |
---|---|
CHECK | Check and wait for I/O to terminate |
CLOSE | Close a file |
ERASE | Erase a file |
OPEN | Create and open a new file |
READ | Read (blockwise, sequential or direct) |
REOPEN | Open an existing file |
WRITE | Write (blockwise, sequential or direct) |
The desired operation is selected by specifying a hexadecimal operation code in the MFCB, and initiated by the EAM macro. The effect is determined by the MFCB fields which EAM additionally evaluates after analyzing the operation code.