Difference between revisions of "Customizing VMS V1.0"
m (SOS HELP output shortened) |
(Just another step to the final version ...) |
||
| Line 45: | Line 45: | ||
* | * | ||
</pre> | </pre> | ||
| − | + | You are at the first line of your file. | |
| − | |||
| − | |||
==== Specifying Lines ==== | ==== Specifying Lines ==== | ||
| Line 60: | Line 58: | ||
'''*''' (asterix) | '''*''' (asterix) | ||
| − | and line numbers. | + | and line numbers, e.g.: '''300''' |
{| class="wikitable" | {| class="wikitable" | ||
| Line 89: | Line 87: | ||
</pre> | </pre> | ||
To display all lines of a file type: '''P^:*''' | To display all lines of a file type: '''P^:*''' | ||
| + | |||
| + | To print the first line of a file type: '''P^''' | ||
| + | |||
| + | To print the last line of a file type: '''P*''' | ||
| + | |||
| + | Your new current line becomes the last line of your '''P'''(rint) command. | ||
| + | |||
| + | ==== Setting the Current Line ==== | ||
| + | To move in your file you set the current line number using the command: '''.<line number>''', e.g.: | ||
| + | |||
| + | <pre> | ||
| + | *.400 | ||
| + | *P. | ||
| + | 00400 The command mode prompt is "*". | ||
| + | * | ||
| + | </pre> | ||
==== Inserting Lines ==== | ==== Inserting Lines ==== | ||
| Line 116: | Line 130: | ||
==== Finding Line Contents ==== | ==== Finding Line Contents ==== | ||
| − | + | To find line contents following the current line use '''Fsearchtext<ESC><RETURN>''', e.g.: | |
| − | + | (You are at the bottom line, therefore:) | |
| + | <pre> | ||
| + | *Fmode$ | ||
| + | String not found, search failed | ||
| + | * | ||
| + | </pre> | ||
| − | To search the whole text | + | To search the whole text, go to the first line and start searching there: |
| − | P^ | + | <pre> |
| + | *P^ | ||
| + | 00100 This is the first line of a new text file. | ||
| + | *Fmode$ | ||
| + | 00300 Using [ESC] switches to command mode. | ||
| + | * | ||
| + | </pre> | ||
| − | ''' | + | '''F'''(ind) remembers the last string searched for, so '''F<RETURN>''' finds the next occurrence (if any): |
| − | + | <pre> | |
| − | + | *F | |
| − | + | 00400 The command mode prompt is "*". | |
| + | *F | ||
| + | 00500 At the command mode "W" writes the file to disk, | ||
| + | *F | ||
| + | String not found, search failed | ||
| + | * | ||
| + | </pre> | ||
==== Substituting Text ==== | ==== Substituting Text ==== | ||
| − | + | Substitute all occurrences on a line use '''Ssearchtext<ESC>replacetext<ESC><RETURN>''', e.g. | |
| − | + | <pre> | |
| + | *p. | ||
| + | 00500 At the command mode "W" writes the file to disk, | ||
| + | *Sm$x$ | ||
| + | 00500 At the coxxand xode "W" writes the file to disk, | ||
| + | * | ||
| + | </pre> | ||
==== SOS Help ==== | ==== SOS Help ==== | ||
| − | + | You can call the online SOS help with the '''HELP''' command: | |
<pre> | <pre> | ||
*HELP | *HELP | ||
| Line 344: | Line 381: | ||
</pre> | </pre> | ||
| − | === Managing devices | + | === Managing Disk Devices, Directories, and Files === |
| + | |||
| + | ==== VMS Disk Devices ==== | ||
| + | |||
| + | VMS disk device names have two or three letters and a number and end with a colon, e.g. '''DM1:''', or '''DMA1:'''. | ||
| + | |||
| + | The first letter '''D''' stands for disk devices. | ||
| + | |||
| + | The second letter specifies the drive drive model: | ||
| + | |||
| + | |||
| + | The third letter (optional) is an '''A''', '''B''', '''C''', or '''D''', if any. You need it if there is more than one controller for a certain type of device. | ||
| + | |||
| + | ==== VMS Directories ==== | ||
| + | |||
| + | ==== VMS File Names ==== | ||
=== DCL command files === | === DCL command files === | ||
Revision as of 11:22, 23 May 2022
UNDER CONSTRUCTION - NOT YET FINISHED!
The aim of this tutorial is to show how to customize VMS V1.0 on the SIMH VAX-11/780 simulator or a real VAX-11/780 ;-).
Contents
Tools and skills needed for customizing
The SOS line editor
You need an Editor to customize VMS.
Using an old fashioned editor is something that really needs getting used to.
VMS V1.0 includes SOS ("Son of Stopgap"), a "Line Editor", i.e. you work on single lines of your text, no simple scrolling as we're used to nowadays.
see: AA-D030B-TE VAX-VMS Primer
Creating a New File
You create a new file by calling the EDIT command followed be the name of your new file.
$ EDIT TEST.TXT Input: DMA0:[SYSMGR]TEST.TXT;1 00100
The editor echos device, directory, and file name of your new file and presents the first (empty) line with its line number (100). Now you just proceed als follows:
$ EDIT TEST.TXT Input: DMA0:[SYSMGR]TEST.TXT;1 00100 This is the first line of a new text file. 00200 Pressing [Enter] starts a new line. 00300 Using [ESC] switches to command mode. 00400 The command mode prompt is "*". 00500 At the command mode "W" writes the file to disk, 00600 and "E" ends the editor. *W [DMA0:[SYSMGR]TEST.TXT;1] *E [DMA0:[SYSMGR]TEST.TXT;1] (NO CHANGES) $
That's all (at least if you writing without typos and changes)!
Editing an Existing File
$ EDIT TEST.TXT Edit: DMA0:[SYSMGR]TEST.DAT;1 *
You are at the first line of your file.
Specifying Lines
To specify lines you use the marks:
: (colon)
. (dot)
^ (caret)
* (asterix)
and line numbers, e.g.: 300
| Mark | Meaning | Example | Explanation of Example |
|---|---|---|---|
| : | Range | 100:500 | Lines 100 through 500 |
| . | Current Line | .:500 | Current line through 500 |
| ^ | First Line | ^:. | First line through current line |
| * | Last Line | .:* | Current line through last line |
Displaying Lines
To display lines 100 to 600 type: P100:600
*P100:600 00100 This is the first line of a new text file. 00200 Pressing [Enter] starts a new line. 00300 Using [ESC] switches to command mode. 00400 The command mode prompt is "*". 00500 At the command mode "W" writes the file to disk, 00600 and "E" ends the editor. *
To display all lines of a file type: P^:*
To print the first line of a file type: P^
To print the last line of a file type: P*
Your new current line becomes the last line of your P(rint) command.
Setting the Current Line
To move in your file you set the current line number using the command: .<line number>, e.g.:
*.400 *P. 00400 The command mode prompt is "*". *
Inserting Lines
Insert after the current line: I.
Insert after e.g. line number 300: I300
Renumbering Lines
Renumbering Lines: N
Deleting Lines
Delete current line: D.
Delete e.g. line number 300: D300
Replacing Lines
Replace current line: R.
Replace e.g. line number 300: R300
Replace a range of lines, e.g. 300:600: R300:600
Finding Line Contents
To find line contents following the current line use Fsearchtext<ESC><RETURN>, e.g.:
(You are at the bottom line, therefore:)
*Fmode$ String not found, search failed *
To search the whole text, go to the first line and start searching there:
*P^ 00100 This is the first line of a new text file. *Fmode$ 00300 Using [ESC] switches to command mode. *
F(ind) remembers the last string searched for, so F<RETURN> finds the next occurrence (if any):
*F 00400 The command mode prompt is "*". *F 00500 At the command mode "W" writes the file to disk, *F String not found, search failed *
Substituting Text
Substitute all occurrences on a line use Ssearchtext<ESC>replacetext<ESC><RETURN>, e.g.
*p. 00500 At the command mode "W" writes the file to disk, *Sm$x$ 00500 At the coxxand xode "W" writes the file to disk, *
SOS Help
You can call the online SOS help with the HELP command:
*HELP
SOS Help Package
To print this entire package on the line printer, type the
DCL command:
PRINT LB:[1,2]SOS.HLP
This package is made up of 11 modules (listed below). Each
module in turn will now be printed at your terminal.
To skip to the next module, discarding the rest of the one
that is printing, type:
<^O> (Type O while pressing CTRL.)
To discard the rest of the Help package at any time, and to
return to Edit-mode command level, type:
<^C> (Type C while pressing CTRL.)
The next time you issue a Help command, you can follow it
with a colon and a number (H:n<CR>); SOS will print the
Help package from module number n through the end.
The modules are:
1. SOS Modes of Operation
2. Edit-Mode Commands -- Functions
3. Edit-Mode Commands -- Formats
4. Definitions for Edit-Mode Command Formats
5. Tag Options for Edit-Mode Commands
6. Alter-Mode Commands
7. Decide-Mode Commands
8. Shorthand Characters in Position Arguments
9. SOS Parameters
10. SOS Switches
11. Special Pattern-Matching Constructs
Module 1: SOS Modes of Operation
The underline (_) represents the next character position after
the prompt. nnnnn is a 5-digit line number.
Mode Prompt Use
------------------- --------- ------------------------------------
Edit *_ Edit: add, change text.
Input nnnnn _ Type in lines of text.
Alter nnnnn _ Edit within a line.
Alter/insert (none) Insert text within Alter mode.
Read-only R*_ Examine a file without changing it.
Copy-file C*_ Search, copy from another file.
Decide D*_ Decide case-by-case on substitutions.
Decide Alter nnnnn _ (Submode.) Like Alter mode.
Decide Alter/insert (none) (Submode.) Like Alter/insert.
-----------------------------------------------------------------------
To Change from One Mode to Another:
FROM mode TO mode You type:
--------- --------- --------------------------
Edit Input Input or Replace command
Alter Alter command
Read-only /READONLY<CR>
Copy-file Copy command with final /C
Input Edit <AL>
Alter Edit <CR>
---------------------------------------------------
Module 2: Edit-Mode Commands -- Functions
Command Function
------------------ -----------------------------------------
A Alter Enter Alter mode for intraline, char-
acter-by-character editing.
C Copy Copy a range of lines to another place
within a file, or from another file.
D Delete Delete a range of lines.
E End End SOS, return to MCR.
F Find Search for the occurrence of one or more
specified strings of text.
H Help List this Help file at the terminal.
I Input Enter Input mode to insert lines of text.
J Join Join two text lines into one line.
K Kill Page Mark Delete a page mark.
L List List a range of lines on the printer or
to a file.
M Mark Insert a page mark.
N reNumber Renumber a range of lines.
NA reNumber Renumber by adding the increment
to each line in the range
NP reNumber Renumber continuing to increment
line numbers across page marks
P Print Print a range of lines on the terminal.
R Replace Delete a range of lines and enter Input
mode.
S Substitute Replace one or more text strings with
other string(s) in a range of lines.
T Transfer Copy a range of lines to a new location
and delete the original lines.
W Save World Write a new file containing all the
changes made so far.
X eXtend Enter Alter/insert mode to add text to the
end of a line or a range of lines.
. Move Position Reset the position of the current line.
= Give Parameter Give the value of an SOS internal para-
meter or switch.
/ Set Parameter Reset an SOS parameter or switch.
@ Indirect File Execute the SOS commands contained in an
indirect file.
<CR> Print next line.
<AL> Print previous line.
Module 3: Edit-Mode Commands -- Formats
Command Format (*)
--------------- -------------------------------------------------
Alter A [range]
Copy C position[=filespec],range[,incr1[,incr2]]
position=filespec/C
Delete D [range]
End E [B][Q][S][T][:filespec]
Find F [[string]<AL>[range][,A][,N][,E][,-][,n]]
Help H [:n]
Input [{,incr}]
I [position][{;incr}]
[{ ;!n }]
Join J [position]
Kill Page Mark K /page
List L [range][,[S][,P[:n] or [:filespec]]]
[range][,[S][,F:filespec]]
Mark M [position]
reNumber N [A P][incr][,[range][,start]]
Print P [range][,S]
Replace [{,incr}]
R [range][{;incr}]
[{ ;!n }]
Substitute S [[oldstring<AL>newstring]<AL>[range][,D][,N][,E]]
Transfer T position,range[,incr1[,incr2]]
Save World W [B][:filespec]
eXtend X [range][,N]
Move Position . position
Give Parameter = parameter
Set Parameter / parameter[:value]
Indirect File @ filespec
<CR> <CR>
<AL> <AL>
------------------------------------------------------------------
(*) The space after the single-character command is optional. End
each command with <CR> (except the commands <CR> and <AL>).
...
[The rest is cut off here; see the full output at you SOS editor.]
Managing Disk Devices, Directories, and Files
VMS Disk Devices
VMS disk device names have two or three letters and a number and end with a colon, e.g. DM1:, or DMA1:.
The first letter D stands for disk devices.
The second letter specifies the drive drive model:
The third letter (optional) is an A, B, C, or D, if any. You need it if there is more than one controller for a certain type of device.