HP RPG/iX Utilities Reference Manual (30318-90006)

2- 152
The BEGIN command achieves effects similar to entering an EXIT command, thus leaving RISE to end the
current editing session, and then reentering RISE to begin a new editing session. If you are editing or
adding to one file and you wish to clear what you have done and start over quickly, BEGIN will save time
and add convenience. If the file you are editing was initiated with the FILE command, RISE will
automatically close that file for you and save your changes so you can start working on a new file.
If you are editing a work file initiated by the TEXT command, the BEGIN command will clear the work file
by purging it so that you may start over on a new file. Because you may wish to save the changes in a
permanent file first, a safety prompt will remind you that you have not used the KEEP command with this
file, and that it will be cleared upon execution. Thus you may reconsider the consequences of the command
before consenting to them. With the NOW parameter in effect, however, RISE will clear the work file
immediately, without displaying the safety messages.
Execution mode: Line
Examples
The following are legal abbreviations which may be used with the BEGIN command and its parameter:
BEG Begin a new editing session.
BN Disable safety prompts and immediately terminate the current editing session to begin a new
one.
In the first example, the ADD command is used to create a five-line file. When the BEGIN command is
issued, safety prompts are returned by RISE. An affirmative response causes the command to be executed
(1). The results of BEGIN are shown when LIST ALL is commanded. The execution message informs the
user that there is no edit file since the file has been cleared (2). Again the ADD command is used to create
a file. In this case, the new file is made permanent using the KEEP command (3). Note that the new
filename, "SAVEFILE", already exists, and a safety prompt appears to ensure that the user wishes to
replace the old SAVEFILE with the new (4).
>ADD
Creating work space file.
1 :LINE 1
2 :LINE 2
3 :LINE 3
4 :LINE 4
5 :LINE 5
6 :<Control Y>
>BEGIN
KEEP not done, CLEAR current work file?YES
(1) Ready to begin new session.
>LIST ALL
(2) Error 65: There is no edit file.
>ADD
Creating work space file.
1 :LINE ONE
2 :LINE TWO
3 :LINE THREE
4 :LINE FOUR