Picture of Robert Gezelter, CDP
RSS Feed Icon RSS Feed Icon
Add to Technorati Favorites
Follow us on Twitter

Adding a phase to STARTUP

There are nine phases in the base OpenVMS Startup sequence. Two of these phases are not used. During the other seven phases, the Startup sequence will execute at least 25 files supplied by OpenVMS Engineering.1

As I wrote in a whitepaper, OpenVMS STARTUP: Underappreciated Flexibility, the Startup sequence is far more than a rote script for OpenVMS initialization. Rather, Startup is a powerful, modular, and extensible approach to implementing the steps required to initialize an OpenVMS instance.

The OpenVMS Consultant previously explored adding a file to the Startup sequence during one of the distribution-defined phases. This installment will explore expanding the list of phases to facilitate additional sequencing of startup activities.

While it is technically possible, it would be incorrect to say that integrating layered products, third-party products, and locally developed elements are limited to the OpenVMS Engineering-defined nine steps (e.g., INITIAL, DEVICES, PRECONFIG, CONFIG, BASEENVIRON, LPBEGIN, LPMAIN, LPBETA, and END). While any sequence of steps can be included serially in a command file, executed in a single phase, serial execution limits our ability to parallelize activities to make more efficient use of system resources. This is particularly true of modern multi-core systems. Executing non-interfering Startup activities in parallel can improve Startup time significantly.

Compatibility with the OpenVMS Engineering-supplied VMS$VMS.DAT file requires that the order of the distributed phases is preserved. However, preserving the order does not mean that additional phases cannot be inserted or appended.

Phase names are arbitrary 12-character names. As an example, we can add a phase LPALPHA to the VMS$PHASES.DAT between phases LPBEGIN and LPBETA. We can then execute three command files (RLGTEST1.COM, RLGTEST2.COM, and RLGTEST3.COM) using SPAWN mode during our newly-defined phase LPALPHA.

Demonstrating this is straightforward. This example can be done on a real system, but it is most safely and easily done using a virtual VAX, Alpha, or x86-64 system. If using a real system, the modifications can easily be reversed by doing a conversational bootstrap, before STARTUP.COM is executed.

First, create a command file RLGTEST.COM containing the following:

$ WAIT 0:4:0 ! Wait for 4 minutes as a stand-in for processing

Now create three copies of RLGTEST.COM in SYS$MANAGER under the names RLGTEST1.COM, RLGTEST2.COM, and RLGTEST3.COM.

The second step is to update the phases file, normally SYS$STARTUP]VMS$PHASES.DAT. This is a sequential file. To define an additional phase, insert a line containing LPALPHA between the lines for LPMAIN and LPBETA. Any standard editor can be used. Remember to save the file.

The third step is use SYSMAN to add the three new files in the layered products database, pointed to by the logical name STARTUP$STARTUP_LAYERED. The commands are:

$ mcr sysman
SYSMAN> startup set database startup$startup_layered
SYSMAN> startup add file rlgtest1.com/mode=spawn/phase=lpalpha
SYSMAN> startup add file rlgtest2.com/mode=spawn/phase=lpalpha
SYSMAN> startup add file rlgtest3.com/mode=spawn/phase=lpalpha

At this point, when the system is rebooted, the Startup log file will show that the three command files added were executed in parallel, each in its own sub-process.

In my consulting practice, I have used techniques such as this many times since the debut of the database-driven STARTUP.COM. I have been able to reduce the Startup time significantly in my cases by effective use of SPAWN mode. Defining additional phases allows me to ensure proper sequencing.


[1]“at least” because several of the files execute indirectly execute one or more other files.


  • Digital Equipment Corporation (1978, August) VAX/VMS 1.0 Systems Managers Guide Chapter 12 Maintaining Start-up Command Procedures
  • Digital Equipment Corporation (1981) VAX/VMS Internals and Data Structures
  • R. Gezelter (2020, December 3) OpenVMS STARTUP: Underappreciated Flexibility Retrieved from http://www.rlgsc.com/publications/openvmsstartupunderappreciatedflexibility.html on December 13, 2020
  • Goldenberg and Saravanan (1994) OpenVMS AXP Internals and Data Structures, Version 1.5 Digital Press
  • VMS Software Inc. (2020) OpenVMS System Managerís Manual, Volume 1: Essentials
  • VMS Software Inc. (2020) OpenVMS System Management Utilities Reference Manual, Volume II MóZ

URLs for referencing this entry

Bringing Details into Focus, Focused Innovation, Focused Solutions
Robert Gezelter Software Consultant Logo
+1 (718) 463 1079