Customizing VMS V1.0

From Computer History Wiki
Revision as of 10:18, 23 May 2022 by Vaxorcist (talk | contribs) (SOS HELP output shortened)
Jump to: navigation, search

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 ;-).

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
*

The asterix (*) is the editor's command mode prompt.

When you see an * at the beginning of a line, the editor expects a command.

Specifying Lines

To specify lines you use the marks:

: (colon)

. (dot)

^ (caret)

* (asterix)

and line numbers.

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^:*

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

Find line contents following the current line:

FEnter<ESC><RETURN>

To search the whole text

P^

Find remembers the last string searched for, so:

F<RETURN>

finds the next occurrence (if any)

Substituting Text

All occurrences on a line

Ssearchtext<ESC>replacetext<ESC><RETURN>

SOS Help

The HELP command will ...

*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 devices and directories

DCL command files

Customize VMS V1.0 startup

Create and customize a VMS V1.0 user

Create a VMS V1.0 user

Create a user login command procedure

Related VMS Manuals