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

2- 209
TEXT
TEXT copies a permanent file into a work file for editing.
Form
T[EXT] filename [N[OW]]
Parameter Explanation
filename Name of the permanent file you are copying to the work file.
N[OW] Your work file contains the contents of one file but you may wish to TEXT another without
saving the contents of that work file. The contents of the file you wish to TEXT will not be
copied unless you KEEP the current work file to a permanent file. You can override the need
to KEEP the file by using the NOW parameter. In doing so you discard your changes. If you
are directly editing a file (using the FILE command) and you give the TEXT command, the
file will be saved (closed) automatically, whether you specify "NOW" or not.
If you choose not to use the "NOW" parameter, RISE displays a safety message asking you if
itisallright to clear the currentworkfile. You may respond with "Y[ES]" to clear the current
file and text in another. If you respond with "N[O]", the TEXT command is cancelled so that
you may perform a KEEP first if you wish.
Purpose
The TEXT command copies the contents of a permanent file into a work file for additions and changes. You
make additions and changes to a work file only, which you save after editing with the KEEP command.
Related Commands
See the discussion of the KEEP command. If the file is unnumbered, RISE automatically appends the
sequence numbers in columns 81-88. If the text file is already numbered, RISE uses the existing sequence
numbers. Text files are compatible with EDIT/3000 files.
* Execution mode: Line or Block.
* Record pointer: At first line in work file.
Examples
The following are legal abbreviations which may be used with the TEXT command and its parameters:
T FILE1 N Copy the contents of a permanent file named FILE1 into
the work file immediately, without displaying safety
prompts or saving changes made to the work file.
TEX FILE1 Copy the contents of the permanent file named FILE1 into
the work file, displaying safety prompts if the current
work file has been edited and has not be saved with the
KEEP command.
In the first example, SIMCAL is copied into the work file using the TEXT command, and an execution
message is returned (1). The first five lines of the file are listed, and then lines 1 through 3 are deleted (2).
An attempt to TEXT SIMCAL with these changes receives a safety prompt (3). When it is answered
negatively, the command is cancelled (4). Next, the KEEP command is used with the filename BACKUP.
Thus, BACKUP without the three lines, is now stored as a permanent file (5).
(1) >TEXT SIMCAL
Text completed.