HP RPG/iX Utilities Reference Manual (30318-90006)
1-135
retain the deleted lines in the permanent file. Using the TEXT command you could copy it back to the
work file in its original state for further work at the terminal.
The price of the safeguard is additional time required to copy the files back and forth between your
permanent file and the RISE work file. If your RPG source file is long, the overhead may be considerable.
You can also edit your files directly using the FILE/EXIT commands. Only one copy of the file is created
with this option. RISE edits the copy directly so that no time is wasted.
In using FILE/EXIT you sacrifice your safeguard, however. You do not have a permanent copy which can
be recalled if, for example, you wish to restore lines mistakenly deleted. Changes made to a file called with
the FILE command cannot be rescinded unless you made a backup copy before editing it.
In general, FILE/EXIT serve best when you are adding to or editing a large RPG source file. When your
file is small, TEXT/KEEP are recommended. Also, for a more efficient use of space, TEXT/KEEP are
recommended for large files that are debugged, complete, and in production. Such files rarely need
additional editing. Storage of a regular sequential file takes less disk space than storage of the same file in
KSAM format because of the extra space consumed storing the associated key file.
Figure 1-4. RISE Editing Methods
Safeguards
RISE has two important built-in safeguards which help to protect you from two serious errors that you
may accidentally make. The first safeguard is associated with the TEXT, FILE, EXIT, and BEGIN
commands. These commands always clear the work file, and there is a danger that you might clear or
destroy a work file you have been editing because you entered one of these commands without first keeping
your recent changes to a permanent file. When there is a possibility that this might happen, RISE will
prompt you with the following question:
"KEEP not done. CLEAR current work file?"
Thus you are reminded that the changes you have made while editing will not be saved if your TEXT,
FILE, EXIT, or BEGIN is immediately executed. You are given the opportunity to decide whether or not
you wish to save the changes first. You may respond "NO" to the question if you want to cancel the
command that you entered; or you may respond "YES" if you do want RISE to go ahead and clear the work
file, executing your command without saving your changes.
WORK
FILE
SOURCE
FILE
SOURCE
FILE
TEXT
KEEP
Edit Copy
Edit Directly
KSAM
Sequential
KSAM
FILE