Difference between revisions of "Customizing VMS V1.0"

From Computer History Wiki
Jump to: navigation, search
m (Just another step to the final version ...)
(Just another step to the final version ...)
Line 414: Line 414:
  
 
==== VMS Directories ====
 
==== VMS Directories ====
 +
A 1- to 9-alphanumeric character string
 +
 +
As subdirectories, in the format of name.name.name where each name can consist of up to 9 alphanumeric characters; each name represents a directory level.
 +
 +
All these formats require the directory name to be enclosed in either square brackets ([ and ]), or in angle brackets (< and >).
 +
 +
A directory can contain an entry for another (sub)directory; that directory can contain an entry for another directory, and so on.
 +
The maximum number of levels, including the first (or top) level directory, is eight.
 +
This structure constitutes a directory hierarchy.
 +
 +
==== VMS File Names, File Types, and Version Numbers ====
 +
(Cited from: AA-D023A-TE VAX-VMS Command Language User's Guide, pdf page 38 et seq.)
 +
 +
File names, file types, and version numbers uniquely identify files within directories.
 +
 +
A file name is a 1- to 9-character string name for a file.
 +
When you create a file, you can assign it a file name that is meaningful to you.
 +
 +
A file type is a 1- to 3-character string that usually identifies the file in terms of its contents.
 +
 +
The valid characters in file names and file types are A-Z and 0-9.
 +
 +
File types must be preceded with a period (.).
 +
 +
By convention, VAX/VMS uses a set of standard file types to identify various classifications of files, and to provide default file types in many commands.
 +
The following table lists these file types.
 +
 +
{| class="wikitable"
 +
|-
 +
! File Type !! Contents
 +
|-
 +
| '''B2S''' || Input source file for the PDP-11 BASIC-PLUS-2/VAX compiler
 +
|-
 +
| '''CMD''' || Compatibility mode indirect command file
 +
|-
 +
| '''COM''' || Command procedure file to be executed with the @ (Execute Procedure) command, or to be submitted for batch execution with the SUBMIT command
 +
|-
 +
| '''EXE''' || Executable program image
 +
|-
 +
| '''FOR''' || Input file containing source statements for the VAX-11 FORTRAN-IV-PLUS compiler
 +
|}
 +
 +
 +
 +
 +
Version numbers are decimal numbers from 1 to 32767 that differentiate between versions of a file.
 +
When you update or modify a file and do not specify a version number for the output file, the system saves the original version for backup and increments the version number by 1.
 +
 +
Note, however, that on Files-11 Structure Level 2 disks, the file system deletes the lowest numbered versions of a file after more than approximately 60 versions of the file exist.
 +
 +
Version numbers must be preceded with a semicolon (;) or a period (.).
 +
 +
When the system displays file specifications, it generally displays a semicolon in front of the file version number.
  
==== VMS File Names ====
 
  
 
=== DCL command files ===
 
=== DCL command files ===

Revision as of 21:39, 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 ;-).

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:

- B = RP04/RP05/RP06 Disk pack drives

- L = RL01/RL02 Disk cartridge drives

- M = RK06/RK07 Disk cartridge drives

- R = RM03 Disk pack drive

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.

The number counts the drives on an controller, beginning with 0.

Some examples:

DMA0: - First RK06 or RK07 drive on the first RK611 controller

DL3: - Fourth RL01 or RL02 drive on the first RL211 controller

DBA2: - Third RP04/RP05/RP06 disk drive on the first RH780 controller

DMB1: - Second RM03 disk drive on the second RH780 controller

VMS Directories

A 1- to 9-alphanumeric character string

As subdirectories, in the format of name.name.name where each name can consist of up to 9 alphanumeric characters; each name represents a directory level.

All these formats require the directory name to be enclosed in either square brackets ([ and ]), or in angle brackets (< and >).

A directory can contain an entry for another (sub)directory; that directory can contain an entry for another directory, and so on. The maximum number of levels, including the first (or top) level directory, is eight. This structure constitutes a directory hierarchy.

VMS File Names, File Types, and Version Numbers

(Cited from: AA-D023A-TE VAX-VMS Command Language User's Guide, pdf page 38 et seq.)

File names, file types, and version numbers uniquely identify files within directories.

A file name is a 1- to 9-character string name for a file. When you create a file, you can assign it a file name that is meaningful to you.

A file type is a 1- to 3-character string that usually identifies the file in terms of its contents.

The valid characters in file names and file types are A-Z and 0-9.

File types must be preceded with a period (.).

By convention, VAX/VMS uses a set of standard file types to identify various classifications of files, and to provide default file types in many commands. The following table lists these file types.

File Type Contents
B2S Input source file for the PDP-11 BASIC-PLUS-2/VAX compiler
CMD Compatibility mode indirect command file
COM Command procedure file to be executed with the @ (Execute Procedure) command, or to be submitted for batch execution with the SUBMIT command
EXE Executable program image
FOR Input file containing source statements for the VAX-11 FORTRAN-IV-PLUS compiler



Version numbers are decimal numbers from 1 to 32767 that differentiate between versions of a file. When you update or modify a file and do not specify a version number for the output file, the system saves the original version for backup and increments the version number by 1.

Note, however, that on Files-11 Structure Level 2 disks, the file system deletes the lowest numbered versions of a file after more than approximately 60 versions of the file exist.

Version numbers must be preceded with a semicolon (;) or a period (.).

When the system displays file specifications, it generally displays a semicolon in front of the file version number.


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