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

Adding a file to STARTUP with SYSMAN

Customizing an OpenVMS configuration is a routine task for both virtualized and non-virtualized instances.

VAX/VMS Version 5.0 (1988) premiered a revised approach to system initialization. Rather than a single command file, SYS$SYSTEM:STARTUP.COM was re-implemented as a sequencer, with the actual initialization activities segregated in a series of appendages contained in the [SYS$STARTUP] directory. The list of appendages, and the sequence of their execution is contained in a series of keyed RMS files, the contents of which are managed using the SYSMAN utility. My recent whitepaper, OpenVMS STARTUP: Underappreciated Flexibility discussed the details of this implementation.

STARTUP.COM preserved conditional invocations for localization files, e.g., SYS$MANAGER:SYSTARTUP.COM and SYLOGICALS.COM. While localization files were preserved, the implementation changed. Localization files are now localization exits to the STARTUP.COM appendage files.

Previously, STARTUP.COM was a straightforward command file, much the same as VAX/VMS' predecessor RSX-11M/RSX-11M-PLUS executed LB:[1,2]STARTUP.CMD during system startup.

The database-centric approach preserved the existing investment in procedures and documentation. The database-driven approach opens up underappreciated possibilities.

It also created a schism. Habits often outlast their utility. Documentation and procedures originating prior to VAX/VMS 5.0, often recommended modifying the SYSTARTUP_VMS.COM and SYLOGICALS.COM files, which was the best option pre-V5.0. Much of the documentation was never revised to recommend the STARTUP databases which are part of the post VAX/VMS Version 5.0 implementation. Over three decades later, many OpenVMS system managers remain unaware of the documented capabilities of STARTUP.COM and its databases.

This installment will describe how to add a file to the list of appendages executed as part of the OpenVMS STARTUP. Future installments will describe other ways to use the facilities provided by STARTUP.COM.

Adding elements to the startup procedure is common. These may include:

One can accomplish these myriad tasks by editing SYSTARTUP_VMS.CO. However, the collection of disjoint tasks turns SYSTARTUP_VMS.COM into a potpourri of tasks, complicating maintenance, It also creates the risk of collateral damage caused by the vicissitudes of manual editing. It is safer, and easier to maintain, if the items related to a particular package are included in separate files. The classic method was to invoke these separate files from one of the localization files.

The database-centric STARTUP.COM provides a more structured option: Adding the desired command file into the STARTUP database. At the desired point in the STARTUP sequence, STARTUP will invoke the desired file separately. There are two advantages to this change:

OpenVMS Engineering defined nine phases in the OpenVMS distribution. SYSTARTUP_VMS.COM is invoked during phase LPBEGIN. As noted in previously referenced whitepaper, interactive logins are enabled as one of the last acts by VMS$LPBEGIN-050_STARTUP.COM, which earlier in its execution invokes SYSTARTUP_VMS.COM. It would be far more helpful if logins were enabled during the END phase.

Suppose we want to add a file, say APPLICATION_STARTUP.COM to the STARTUP sequence.

For illustration, APPLICATION_STARTUP.COM contains a simple definition of a logical name in the system logical name table, LNM$SYSTEM_TABLE:

$! APPLICATION_STARTUP.COM
$ stdrv$say "APPLICATION_STARTUP.COM entry"
$!
$ ASSIGN/SYSTEM "XYZ" APPLICATION_NAME
$ stdrv$say "APPLICATION_STARTUP.COM exit"
$ EXIT

The simplest way to accomplish this would be to add APPLICATION_STARTUP.COM to the STARTUP database STARTUP$STARTUP_LAYERED using the commands:

$ copy application_startup.com sys$specific:[sysmgr]
$ mcr sysman
SYSMAN> startup set database startup$startup_layered
SYSMAN> startup add file application_startup.com/mode=spawn/phase=lpbegin
SYSMAN>^z

APPLICATION_STARTUP.COM will now be executed during the next STARTUP, during phase LPBEGIN, as a spawned subprocess. If we check the STARTUP.LOG file, we will find the APPLICATION_STARTUP.COM entry/exit messages in the startup log. Checking the system logical name table after startup will show that the logical name APPLICATION_NAME is properly defined.

If we wish to temporarily disable APPLICATION_STARTUP.COM, we can use the SYSMAN command STARTUP DISABLE FILE APPLICATION_STARTUP.COM. Similarly, to permanently stop execution, we can use the SYSMAN command STARTUP REMOVE FILE APPLICATION_STARTUP.COM.

This is one of the simplest cases of using the STARTUP databases. There are other ways the STARTUP process can be tailored to improve operations.

References

  • 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
http://www.rlgsc.com
+1 (718) 463 1079