Download Print this page

HP 3000 Manual page 161

Mpe/ix computer systems, rpg/xl utilities
Hide thumbs Also See for 3000:

Advertisement

Form
FIL[E] filename [N[OW]]
Parameter Explanation
filename
Name of the file to be edited directly.
N[OW]
Execute the command immediately without safety prompts. NOW is significant with FILE if,
previous to issuing the command, you were editing a copy of another file. If you were directly
editing another file, having used the FILE command, that file will be closed automatically,
and your changes made permanent. However, if you used the TEXT command to copy it into
a work file, RISE will not open another file unless you enter the KEEP command to save your
changes, or specify the NOW parameter to discard your changes. The NOW parameter is
used when immediate execution is required. It disables safety prompts.
If you choose not to use the "NOW" parameter, RISE will return a safety prompt asking if you
want to clear the current work file. If you respond with "Y[ES]", it will clear the file, and an-
other file will be accessed for editing. If you respond with "N[O]", it will cancel the FILE com-
mand so that you may perform a KEEP first if you wish.
Purpose
The FILE command allows you to edit directly a file named "filename". If "filename" is not already a
KSAM file, RISE will create one for editing and prompt you for maximum number of records in the new
file. In other words, the KSAM work file is your permanent source file.
FILE is especially useful when your source program is long. If you use the TEXT/KEEP commands to
bring the file to the terminal for editing or additions, this means that a permanent file must be copied into
a work file (KSAM file). Such copying increases overhead. The FILE command does not require a file to be
copied.
A disadvantage of the FILE command is that an error that occurs during editing cannot be corrected easily
and quickly unless a backup copy was made for purposes of restoration before the editing began.
The FILE command specifies that the file "filename" is the file which is to be edited directly. RISE then
ensures that "filename" is in the KSAM file form. To do so, three possible cases must be considered.
Case 1. Creating New File
The file "filename" does not exist and must be created as a KSAM file. In order to do this, you create the
file.
You type
> FILE " filename " **
RISE responds Creating new KSAM file, enter maximum number of records.
Case 2. Accessing Old KSAM File
"filename" has been created as a KSAM file (called "newfile" below).
You type
> FILE " newfile "
RISE responds File opened.
** You do not enclose the filename in quotes when entering a command. Quotes are used around filename
in these cases to indicate a place holder representation of the real name of your file. For example, FILE
2- 163

Advertisement

loading