Access to files is executed by calling action macros for the various access methods. DMS also handles the opening and closing of files (OPEN/CLOSE processing) as a function of the access method involved.
DMS macros for file processing (“service macros”)
The DMS macros for file processing (i.e. the “service macros”) are macro calls which are valid for all access methods.
Macro | Brief description |
CLOSE | closes one or more files. |
EXLST | defines error exits. |
EXRTN | implements a return from EXLST routines. |
FCB | creates a file control block (FCB). |
FCBAD | creates the FCB in the literal pool of a program. |
LBRET | implements a return from user label handling routines (tape processing). |
OPEN | opens a file. |
Macros specific to the access methods
A distinction is made between the following access methods:
BTAM
DIV
EAM
FASTPAM
SAM
ISAM
UPAM
Access takes place in the familar way for encrypted files (with plain text content). Decryption when reading and encryption when writing are performed internally and automatically. The macros for file access in a program do not need to be modified for this purpose. Before a file is opened it is only necessary to enter the associated crypto password in the crypto password table of the accessing task. This can be done before the program is started.
In the tables below, the macros used for file access are assigned to the various access methods.
BTAM (Basic Tape Access Method)
BTAM is an access method for block-oriented tape processing; it can also be used to process tape files which were not created with BTAM. During processing of a tape file, the direction in which the file is processed can be changed as desired within the file, and tapes can be positioned to any desired block or section. BTAM processes files with or without standard blocks.
Macro | Brief description |
BTAM | controls all BTAM actions. |
FEOV | initiates a tape swap. |
NDWERINF | interrogates the status bytes. |
DIV (Data In Virtual)
The basis for file processing for a user is 4KB blocks. DIV can also be used to process files that were not created with DIV.
Macro | Brief description |
DIV | Process files with the DIV access method
|
EAM (Evanescent Access Method)
EAM is used to process task-specific temporary files in the SYSEAM area. It is a block-oriented access method and is particularly suitable for rapid processing of task-specific work files.
Macro | Brief description |
EAM | Controls all EAM accesses |
FASTPAM (Fast Primary Access Method)
FASTPAM is a block-oriented access method which always works with 4KB blocks. FASTPAM can also be used to process files that were not created with FASTPAM.
Macro | Brief description |
FPAMACC | File access functions |
| |
FPAMSRV | Management functions |
|
SAM (Sequential Access Method)
SAM is a record-oriented access method. The records are stored sequentially in the file. SAM lets users process records sequentially in either direction (beginning-of-file to end-of-file or vice versa). For tape processing, SAM complies with all requirements of DIN 66029 up to exchange level 3. Files with either standard or nonstandard blocks can be processed.
Macro | Brief description |
FEOV | initiates a tape swap. |
GET | retrieves the next record. |
PUT | writes the next record. |
PUTX | (locate mode only) replaces a record read by means of GET. |
RELSE | terminates a data block. |
SETL | positions to beginning-of-file, to end-of-file, or to a record. |
ISAM (Indexed-Sequential Access Method)
The basis for file processing is the structure of an ISAM file with its index and data sections. Each record contains a key and the keys are the criterion for sorting the record. For index and data blocks, see the “Introductory Guide to DMS” [1].
Macro | Brief description |
ADDPLNK | assigns a pool link name to a user ISAM pool. |
CREAIX | creates a secondary index for an ISAM file. |
CREPOOL | sets up a user ISAM pool. |
DELAIX | deletes secondary indices of an ISAM file. |
DELPOOL | deletes a user ISAM pool. |
ELIM | deletes a record from the file. |
GET | reads the records from the file sequentially. |
GETFL | if flagged ISAM keys are used: reads the next record within the flag range (sequentially). |
GETKY | reads the first record with the specified key. |
GETR | reads the records sequentially in reverse order. |
INSRT | inserts a record into the file with a new ISAM key. |
ISREQ | clears an ISAM lock. |
OSTAT | informs the caller about the number and type of concurrent file accesses. |
PUT | sequentially writes records to the end of the file (and also checks that the keys are in the right order). |
PUTX | replaces a record read previously. |
REMPLNK | deletes the pool link name. |
RETRY | after execution of the EXLST PGLOCK exit, resets the ISAM pointer and repeats the last macro. |
SETL | positions the ISAM pointer to the beginning of the file, to the end of the file or to a specific record for subsequent processing. |
SHOPLNK | provides information about the assignment of ISAM pools to pool link names. |
SHOPOOL | provides information about attributes and assignment status of ISAM pools. |
SHOWAIX | provides information about secondary indices of an ISAM file. |
STORE |
|
UPAM (User Primary Access Method)
UPAM is a block-oriented access method. The basis of UPAM is the standard block (= PAM page). UPAM can also be used to process files that were not created with UPAM.
Macro | Brief description |
PAM | Controls all UPAM accesses |
For event-driven processing, the following macros are also significant (for detailed descriptions, see the “Executive Macros” [2] manual).
Macro | Brief description |
CHKEI | checks the queue status for an event item. |
CONTXT | accesses the register set of the interrupted task/process. |
DISCO | closes the routine for the contingency process. |
DISEI | disconnects the user program from the event item. |
ENACO | opens a routine as a contingency process and assigns it a name and a priority. |
ENAEI | creates an event item and/or establishes the link between the calling process and the event item. |
FECB | creates a file event control block. |
LEVCO | changes the priority of the called process. |
POSSIG | signals an event. |
RETCO | terminates the calling contingency process. |
SOLSIG | requests a signal from the event item. |
SUSPEND | places the calling process in an interruptible wait state. |