Guardian Programmer's Guide

Table Of Contents
Using the IOEdit Procedures
Guardian Programmer’s Guide 421922-014
14 - 2
Overview of IOEdit
If your application cannot satisfy all the above restrictions you must use Enscribe files
or NonStop SQL files.
Overview of IOEdit
Before discussing how you can use IOEdit to perform operations on EDIT files, some
of the major concepts of the IOEdit package will be introduced. This subsection
discusses:
The types of files IOEdit can access
How to choose between the various tools available for accessing EDIT files
How lines are typically numbered in an EDIT file and how those line numbers
correlate to record numbers
The purpose of the EDIT file segment (EFS)
When Should You Use IOEdit?
You can access EDIT files using any of the following sets of procedures:
EDITREADINIT and EDITREAD procedures
SIO procedures
IOEdit procedures
EDITREADINIT and EDITREAD work for applications that need only to read EDIT files
sequentially. To do more than sequential reads, you should use SIO or IOEdit.
Use Tables 14-1 and 14-2 to establish whether to use IOEdit or SIO in your application
to access EDIT files.
Table 14-1 lists the advantages of IOEdit over SIO.
Table 14-1. Advantages of IOEdit Over SIO (page 1 of 2)
If you want to... Then IOEdit is better than SIO because...
Write a text editor. IOEdit allows files to be open for input and output
a
t the same time; SIO does not. IOEdit supports
deleting records, inserting records, replacing
records, backspacing over records, and
renumbering records in all or part of a file; SIO
supports none of these features.
Perform random access as well as
se
quential access.
SIO supports only sequential access.
Use an extended data segment for
ref
erence parameters.
IOEdit can use extended data segments; SIO
cannot.