I just installed the sixpack VM system from http://www.smrcc.org.uk/members/g4ugm/VM370.htm to run under Hercules on my Linux server. The zip file extracted into 6 VM CCKD files (and a couple of others I assume are unused), along with a Hercules conf file.
Everything worked just fine, but now I want to edit a file under VM and I really don’t know how. There seems to be no XEDIT command available on this very old system. But hey, there is an EDIT command – I just have no idea how to use it, and I can’t find doc anywhere. But I can experiment and guess and I think I figured out just enough to get by.
So let’s type the command EDIT TEST DATA and we get the following screen:
It’s pretty easy to see TOF and EOF (top and end of file) with nothing in between because this is a new file. The identifier at the top left of the screen indicates NEW, and will change between EDIT and INPUT as we work. As far as I can tell, there is no way to overwrite existing data by moving the cursor to that data. The only place we can type is on the command line at the bottom of the screen. So let’s type an insert command “i” and type a few lines:
Some things to notice:
- The mode indicator shows INPUT since we issued the “i” command.
- Each line was added by typing text and pressing Enter
- The last line is at the current position, so it is highlighted
Now we need to get out of INPUT mode. To do that, just press Enter with no input, and the mode indicator should change to EDIT.
We can now run some edit commands to make modifications to the existing lines, such as:
|i||Switch to INPUT mode. Then type data and press enter to continue inserting text after the current position. To go back to EDIT mode, press Enter with no other input|
|d||Move the current position down one line|
|u||Move the current position up one line|
|n||Move the current position up one line – seems to be the same as d|
|b||Move the current position to the bottom. The “bot” command seems to do the same|
|top||Move the current position to the top.|
|c||Change data on the current line. For example, c/OLD/NEW/ changes text on that line.|
|r||Replace the current line, for example: r This will be the new line|
|del||Delete the current line|
|file||Save the file and exit|
|quit||Exit without saving|
I’m sure there is a whole lot more to this editor, including adding numbers to commands such as d10 to go down 10 lines, but with these few commands you should be able to make minor edits.