Macro type: type R
The RELSE macro has the following effect, depending on the file type:
for files opened with OPEN INPUT/REVERSE/UPDATE, the records remaining in the buffer are ignored by the next GET macro, and the first record in the next block is read from the file;
for files opened with OPEN OUTPUT/EXTEND, the next PUT macro writes the block to the file and the next record becomes the first record of a new block;
In locate mode, DMS supplies the IOREG register (see FCB macro, IOREG operand, "FCB - Define file control block") with the address of the first free byte within the buffer. The user must then ensure that the record to be included in the output file is made available at this address.
If format V records are processed in locate mode then the free buffer capacity is displayed in the VARBLD register (see FCB macro, VARBLD operand, "FCB - Define file control block"). After the RELSE call, the free buffer capacity is equal to the block length minus the buffer offset (see BLKSIZE and/or BUFOFF in the FCB macro, "FCB - Define file control block" and "FCB - Define file control block" respectively).for files opened with OPEN UPDATE, the current data block is written back to the disk (if a record has been updated with PUTX), and the next GET returns the first record of the next data block.
Format
Operation | Operands |
|
|
Operand descriptions
fcbaddr
Address of the FCB associated with the file to be processed.
(1)
The FCB address is stored in register 1.
PARMOD
Specifies the generation mode for the macro.
Default value: | the value predefined for the generation mode by means of the GPARMOD macro or preset by the assembler. |
= 24
The macro is expanded in accordance with the 24-bit interface format. The object code can run only in 24-bit addressing mode.
= 31
The macro is generated as addressing mode-independent.
SYNC
The processing of output files can be synchronized.
Default value: | SYNC=NO |
= NO
File processing is not synchronized.
= YES
Permitted only in conjunction with PARMOD=31; file processing is synchronized, i.e. after a RELSE..., SYNC=YES all data is on the disk or tape and there is no WAIT outstanding.
For files on tape cartridges, RELSE..., SYNC=YES causes the contents of the device buffer to be written to the tape cartridge.
Programming notes
The RELSE macro overwrites the contents of registers 0, 1, 14 and 15.
A RELSE macro results in an SVC only when a buffer transfer is initiated. Consequently, the user cannot expect to receive control in an STXIT process each time a RELSE macro is issued (when using the STXIT macro with the SVC= or SVCLIST= operand; for more details, see the “Executive Macros” manual [2]).