Join File [ HP EDIT Reference Manual ] MPE/iX 5.0 Documentation
HP EDIT Reference Manual
Join File
Purpose
Inserts the text from one file into another.
Default Syntax
J
Description
This command merges another file into the current file by inserting the
joined file above the cursor line.
Join Process
When you execute the command, HP EDIT prompts you for the file name. You
then specify a file name and press Return. If you specify an invalid
name, HP EDIT displays Not able to open the file on the message line. If
you do not specify a file name before pressing Return, HP EDIT displays
File not joined on the message line.
Join Applications
There are three typical applications for this command:
* Adding another file to the current file
* Temporarily viewing another file from the current file
* Inserting an existing file into a newly created file
You can add another file to the current file by moving to the insertion
location and executing the command. You can then delete or modify lines
in the newly joined file as needed.
You can temporarily view another file by executing the command at any
location. This function is useful if you want to view another file
without having to save and retext the current file. You can view the
file using cursor or window movement commands, and then cancel the join
operation with the command Undo Last Command.
You can insert an existing file into an empty, newly created file by
texting in the new file and then executing this command. This function
is useful if you want to create a new file similar to an existing file.
You can merge the existing file into the newly created file and then
selectively modify the text.
Procedures
To join a file into an existing file:
1. Move the cursor anywhere on the line above which you want to join
the file.
2. Press the J key, or press the File Commands function key, followed
by the Join File function key. HP EDIT displays the prompt Join
file: on the message line.
3. Type a file name and press Return. HP EDIT joins the file above
the cursor line. If the joined file is lengthy, the message Join
file, please wait... may momentarily appear on the message line.
When the file is joined, X lines joined appears on the message
line, where X equals the number of lines in the joined file.
To join an existing file into a newly created file:
1. Create the new file using the desired file name. If you are
currently in the MPE command interpreter, run HP EDIT and specify
the new file name. If you are currently in an editing session,
use the Text File command and specify the new file name.
2. Press the J key, or press the File Commands function key, followed
by the Join File function key. HP EDIT displays the prompt Join
file: on the message line.
3. Type the desired file name and press Return. HP EDIT joins the
named file and displays the message X lines joined on the message
line, where X equals the number of lines in the joined file.
Example
To join a 10 line file named NEW into the top of the current file named
OLD:
1. Execute the Top Of File ( ( ) command.
2. Press the J key. HP EDIT displays the prompt Join file: on the
message line as shown:
3. Type new beginning at the cursor location as shown:
HP EDIT joins the specified file into the current file and shows
the number of joined lines on the message line as shown:
Related Commands
Join Lines
Join Lines And Justify
MPE/iX 5.0 Documentation