Macro type: type S (E form /L form /D form /C form /M form); see "Macro types"
General
All operands can be specified in a DIV macro, regardless of the DIV function (operand FCT). The evaluation of the operands depends upon the selected DIV function.First, all operands are presented in an overview. The format and the operands evaluated for the respective functions are described for each function unit. The format overview is follwed by a summary description of the DIV macro funtions.
Operand values which are neither address nor register entries are referred to as “direct specification” in the operand description.
The operand value “addr” defines a symbolic address that can be stored in an A constant, i.e. the symbolic address must be evaluatable at compile time and must not be included in a DSECT.
The various forms of the MF operand are described in detail in the appendix ("Macro types").
Parameter list
The parameter list of the macro contains a header with fields that can be automatically supplied with values by means of the L form when the parameter list is generated.
If the parameter list is dynamically generated with the D or C forms, it must first be initialized with a parameter list that has been generated with the L form. This is the only way of ensuring that the header of a parameter list is correctly supplied with values.
Wherever fields of a parameter list are referred to in the following description, the names of the parameter list have been indicated as they are generated by MF=D (without a PREFIX specification).
Special parameters in the parameter list
The following parameters are return parameters which can only be accessed directly via the parameter list.
DIVPID
The ID of the OPEN is returned in DIVPID. It must be contained in the parameter list in order to call other DIV functions that belong to the same OPEN. If the same parameter list is used, the DIVPID will have already been entered.
DIVPSIZE
DIVPSIZE returns the logical file size of OPEN in 4096-byte page units. DIVPSIZE contains the number of the last logical 4K page (1 means that the first file page is the last logical page, and 0 means that the file is empty). DIVPSIZE can be evaluated to request memory for a window.
If a file has already been accessed using the UPAM access method, it is possible that the logical end-of-file may not lie on a 4K page boundary. In such cases, DIVPSIZE returns the rounded value. The last half-page before the logical EOF will then appear in the window initialized with X'00'.
Since the file can be logically extended or truncated by SAVE, DIVPSIZE is updated after every successful call to SAVE. DIVPSIZE will then contain the number of the last logical 4K page of the file (1 means that the first page of the file is the last logical page; 0 means that it is empty).
Modifying file characteristics via a command or macro
SHARUPD mode (NO | WEAK | YES) can be changed via the ADD-FILE-LINK command (or via the FILE macro).
OPEN mode (INPUT | INOUT | OUTIN) cannot be changed via the ADD-FILE-LINK command or via the FILE macro.
With the ADD-FILE-LINK command, the operands ACCESS-METHOD and BLOCK-CONTROL-INFO must not be specified in a way which contradicts the file structure attributes FILE_STRUC=PAM or BLK-CONTR=PAM. The same applies for the operands FCBTYPE and BLKCRTL of the FILE macro.
Format overview
Operation | Operands |
|
|
| |
| |
|
Function overview
Function | Brief description | See |
FCT = *OPEN | Open DIV / PAM file | |
FCT = *MAP | Create window in address space | |
FCT = *SAVE | Write back modified window pages to the disk file | |
FCT = *RESET | Undo changes to window pages | |
FCT = *UNMAP | Delete window | |
FCT = *CLOSE | Close disk file |