Difference between revisions of "Customizing VMS V1.0"

From Computer History Wiki
Jump to: navigation, search
(Create a VMS V1.0 User Account: Explanations for "ADD" command added)
m (Target moved)
 
Line 594: Line 594:
 
* '''PASSWORD''': User account password to be used for login
 
* '''PASSWORD''': User account password to be used for login
 
* '''UIC''': User identification code; used internally to uniquely identify a user account. It consists of a group and a member number.  
 
* '''UIC''': User identification code; used internally to uniquely identify a user account. It consists of a group and a member number.  
* '''-''' (dash): [[DIGITAL Command Language|DCL]] command line continuation character
+
* '''-''' (dash): [[Digital Command Language|DCL]] command line continuation character
 
* '''DIRECTORY''': Name of the default directory for the user account
 
* '''DIRECTORY''': Name of the default directory for the user account
 
* '''DEVICE''': Name of the default device for the user account
 
* '''DEVICE''': Name of the default device for the user account

Latest revision as of 00:18, 30 August 2024

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


... 
[The rest is cut off here; see the full output at you SOS editor.]

Managing VMS Disk Devices, Directories, and Files

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

A full file specification consists of four parts:

  • DECnet node name (default: local node)
  • Disk (default: default disk)
  • Directory (default: default directory)
  • File

All parts (except the file name) have default values, so that they can be omitted if the defaults apply.

When you log in, your defaults are set as specified in your login account data as a starting point. Then you can change the defaults for disk and directory with the SET DEFAULT command.

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:

  • 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

VMS directory names are made of a 1- to 9-alphanumeric character string.

The top level directory on every disk has the fixed name 000000.

You must specify the top level directory only when you want to acess it; otherwise it can be left off and the tree of directories starts with the name of the first subdirectory below 000000.

Subdirectories have the format of ...NAME.NAME.NAME... where each name can consist of up to 9 alphanumeric characters; each name represents a directory level.

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.

The complete directory name must be enclosed in either square brackets (...[... and ...]...), or in angle brackets (...<... and ...>...).

VMS File Names, File Types, and Version Numbers

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
LIS Listing file created by a language compiler or assembler;
default input file type for PRINT and TYPE commands
LOG Batch job output file
LST Compatibility mode listing file
MAC MACRO-11 source file
MAP Memory allocation map created by the linker
MAR VAX-11 MACRO source file
MLB Macro library
OBJ Object file created by a language compiler or assembler
ODL Overlay description file
OLB Object module library
OPT Options file for input to the LINK command
PAR SYSGEN system paramter file
STB Symbol table file created by the linker

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.

Logical Names

  • A Disk name, or:
  • A disk name, and a directory path, or:
  • A disk name, a directory path, and a file name

can all be substituted by a logical name (short: LOGICAL)

You can use logicals in place of the substituted components, e.g.

$ DIR SYS$SYSTEM:

DIRECTORY DM0:[SYSEXE]
24-MAY-79 09:39

16USER.PAR;1        5.      C  21-AUG-78 15:54
32USER.PAR;1        5.      C  21-AUG-78 15:54
48USER.PAR;1        5.      C  21-AUG-78 15:54
64USER.PAR;1        5.      C  21-AUG-78 15:54
... (output truncated)

TOTAL OF 17526./17724. BLOCKS IN 104. FILES

$ 

instead of:

$ DIR DMA0:[SYSEXE]

DIRECTORY DM0:[SYSEXE]
24-MAY-79 09:39

16USER.PAR;1        5.      C  21-AUG-78 15:54
32USER.PAR;1        5.      C  21-AUG-78 15:54
48USER.PAR;1        5.      C  21-AUG-78 15:54
64USER.PAR;1        5.      C  21-AUG-78 15:54
... (output truncated)

TOTAL OF 17526./17724. BLOCKS IN 104. FILES

$

There are some system-predefined logicals for convenience; enter SHOW LOGICALS to see their definitions.

You can define your own logicals additionally (not covered here), see HELP DEFINE.

Logicals are usually used to access system files in their standard places.

DCL Command Files

You use DCL command files to group commands you want to be executed in sequence, either interactive, or as a batch job.

Examples:

  • LOGIN.COM = user login procedure
  • STARTUP.COM = system startup procedure, part #1
  • SYSTARTUP.COM = system startup procedure, part #2
  • SHUTDOWN.COM = system shutdown procedure

Type DIR DM0:<*>*.COM to list command procedures of VMS V1.0.

Command files are text files of a certain format with the file type COM. They are started with the @ (Execute Procedure) command, e.g. @LOGIN.

You can omit the file type, which defaults to COM, on invocation.

Command lines begin with $ , whereas comment line begin with $!

Just place your commands in the command file like you would type them at the command prompt.

For details see: AA-D023A-TE VAX-VMS Command Language User's Guide

Customize VMS V1.0 Startup

You customize VMS V1.0 startup by editing SYS$DISK:[SYSMGR]SYSTARTUP.COM.

The file exists, but is empty on a new installation.

Place commands here that are to be executed every time the system is booted.

If you have a separate data disk you want to make available to all users, e.g. DMA1:, you could put the MOUNT/SYSTEM command in SYSTARTUP.COM:

$ MOUNT/SYSTEM DMA1: DATA

Remember to put the $ at the beginning of every line to be executed!

Create and Customize a VMS V1.0 User Account

Create a VMS V1.0 User Account

Run the AUTHORIZE utility to manage user accounts:

$ SET DEFAULT SYS$SYSTEM:
$ RUN AUTHORIZE
UAF>

Create a list of all user accounts yet existing:

UAF>LIST
WRITING LISTING FILE
LISTING FILE SYSUAF.LIS COMPLETE
UAF>EXIT
NO MODIFICATIONS MADE
$ TYPE SYSUAF.LIS
     OWNER             USERNAME        UIC      ACCOUNT    PRIV   PRI  DEFAULT DIR
                       DEFAULT       [200,200]            NOPRIV    4  [200,200]
 SYSTEM MANAGER        SYSTEM        [001,004]  SYSTEM    PRIV      4  [SYSMGR]
 FIELD SERVICE         FIELD         [001,010]  FIELD     NOPRIV    4  [SYSMAINT]
 SYSTEST-UETP          SYSTEST       [001,007]  SYSTEST   PRIV      4  [SYSTEST]

$ RUN AUTHORIZE
UAF>

Add a new account for a 'standard' user (one without special privileges):

UAF>ADD GUEST /OWNER=GUEST /PASSWORD=GUEST /UIC=[300,1]-
_/DIRECTORY=[USERS.GUEST] /DEVICE=DM0: /LGICMD=LOGIN.COM
USER RECORD SUCCESSFULLY ADDED
UAF>SHOW GUEST

USERNAME: GUEST         OWNER: GUEST
ACCOUNT:                UIC: [300,001]
DIRECTORY: [USERS.GUEST]        DEVICE: DM0:
LOGIN COMMAND FILE: LOGIN.COM    LOGIN FLAGS:
CLI:  DCL        PRCLM:       2  PRIO:          4
ASTLM:       10  BIOLM:       6  BYTLM:      4096
DIOLM:        6  FILLM:      20  TQELM:        10
WSDEFAULT:  150  WSQUOTA:   200  PGFLQUOTA:    40
PRIVILEGES:
   GRPNAM GROUP PRMCEB PRMMBX TMPMBX
UAF>EXIT
UAF UPDATES COMPLETED
$

Explanation of ADD command details:

  • GUEST: User account name to be used for login
  • OWNER: User ASCII string that may, for example, be useful for billing purposes
  • PASSWORD: User account password to be used for login
  • UIC: User identification code; used internally to uniquely identify a user account. It consists of a group and a member number.
  • - (dash): DCL command line continuation character
  • DIRECTORY: Name of the default directory for the user account
  • DEVICE: Name of the default device for the user account
  • LGICMD: Name of the DCL command procedure that is executed automatically on login

Create user directory:

CREATE/DIRECTORY DM0:[USERS.GUEST] /OWNER=[300,1]

It is important to specify the new user's UIC as the owner of the directory (/OWNER=[300,1]).

Hence the new owner gets ownership of his home directory and can create files and subdirectories at will.


Test user account:

$ LOGOUT
  SYSTEM       LOGGED OUT AT 26-MAY-1979 08:56:33.69
Username: GUEST
Password:
        Welcome to VAX/VMS Version 1.00
$ SHOW DEFAULT
  DM0:[USERS.GUEST]
$ DIR
PIP -- no such file(s)
$ DIR /FULL DM0:[USERs]GUEST.DIR


DIRECTORY DM0:[USERS]
26-MAY-79 09:11

GUEST.DIR;1         (633,1)         1./4.         C  26-MAY-79 08:53
  [300,1]  [RWE,RWE,RWE,RE]

TOTAL OF 1./4. BLOCKS IN 1. FILE

$ LOGOUT
  GUEST        logged out at 26-MAY-1979 08:57:00.57

The login was successful, and the new user is put into his assigned home directory.

The home directory is empty (the result of DIR is PIP -- no such file(s)).

The home directory has got the correct owner [300,1] and rights [RWE,RWE,RWE,RE].

Rights are specified in four groups (left to right):

  • System
  • Owner
  • Group
  • World

Each group has got assigned a set of zero to four rights:

  • R = Read
  • W = Write
  • E = Execute
  • D = Delete

For details refer to AA-D027A-TE VAX-VMS System Manager's Guide:

  • PART II SETTING UP AND USING A SYSTEM OF ACCOUNTS

Create a User Login Command Procedure

Log in as user GUEST and create a command procedure (text file) DMA0:[USERS.GUEST]LOGIN.COM using the SOS editor.

Put those commands in this file that are to executed automatically every time the user GUEST logs in.

Remember to put the $ at the beginning of every line to be executed!

Lines with $! at the beginning are comment lines.

See the following example:

$ EDIT LOGIN.COM
Input: DMA0:[USERS.GUEST]LOGIN.COM;1
00100   $! LOGIN.COM FOR USER GUEST
00200   $!
00300   $! SET TERMINAL CHARACTERISTICS
00400   $  SET TERMINAL /VT52
00500   $  SET TERMINAL /UPPER
00600   $!
00700   $! WELCOME MESSAGE
00800   $  WRITE SYS$OUTPUT ""
00900   $  WRITE SYS$OUTPUT "WELCOME GUEST!"
01000   $  WRITE SYS$OUTPUT ""
01100   $  WRITE SYS$OUTPUT "THE TIME IS:"
01200   $  SHOW TIME
01300   $  WRITE SYS$OUTPUT ""
01400   $  WRITE SYS$OUTPUT "HAVE FUN USING VMS V1.0!"
01500   $  WRITE SYS$OUTPUT ""$
*W
[DMA0:[USERS.GUEST]LOGIN.COM;1]
*E
[DMA0:[USERS.GUEST]LOGIN.COM;1]   (NO CHANGES)
$

Test the command procedure by logging out and in again.:

$ LOGOUT
  GUEST        logged out at 26-MAY-1979 09:40:43.27
Username: GUEST
Password:
        Welcome to VAX/VMS Version 1.00
        
WELCOME GUEST!

THE TIME IS:
  26-MAY-1979 09:40:50

HAVE FUN USING VMS V1.0!

$

Related VMS Manuals

  • AA-D027A-TE VAX-VMS System Manager's Guide