Guardian Programmer's Guide

Table Of Contents
Using the IOEdit Procedures
Guardian Programmer’s Guide 421922-014
14 - 3
When Should You Use IOEdit?
Sequentially read a file from its start to
its middle, then start writing, deleting
any existing records from that point;
that is, simulate a tape.
You can do this using IOEdit, but not using SIO.
Have faster throughput. IOEdit is faster because it does not need to
p
erform checksum operations; SIO does need to
perform periodic checksum operations to guard
against the user program inadvertently overwriting
the SIO buffers in the user data segment. IOEdit
buffers are protected in the EFS.
Read and write lines in a packed form;
f
or example, when writing a compiler to
copy input lines to a scratch file in
packed form, and to speed up the
scanning of source lines by not having
to skip over long strings of blanks one
character at a time.
IOEdit supports reading and writing of text lines in
packed as well as unpacked form; SIO supports
only unpacked records.
Avoid having to use space in the user
da
ta segment for input and output
buffers.
IOEdit allocates all the space it needs in its own
program file segment; SIO uses at least 144 bytes
of the user data stack for reading and at least
1024 bytes for writing. For acceptable
performance, SIO often needs much larger
buffers.
Save disk space on smaller files. IOEdit assumes default extent sizes of one page
f
or both primary and secondary extents; SIO
assumes default sizes of 4 and 16 pages.
Specify sync depth when opening a file. IOEdit permits you to specify the sync depth; SIO
d
oes not.
Have damaged files repaired when
op
ening (like text editors do).
IOEdit can repair damaged EDIT files; SIO
cannot.
Avoid having to set up special control
b
locks for the files you are accessing.
IOEdit procedures need only the file number
returned by the FILE_OPEN_ procedure; SIO
requires that you set up a separate file control
block for each file and a common file block.
Table 14-1. Advantages of IOEdit Over SIO (page 2 of 2)
If you want to... Then IOEdit is better than SIO because...