Mount ISO and execute scripts on OpenVMS
Published: 08-05-2018 | Author: Remy van Elst | Text only version of this article
❗ This post is over five years old. It may no longer be up to date. Opinions may have changed.
Table of Contents
(You can read all my OpenVMS articles by clicking the picture above)
I'm playing around with OpenVMS on Alpha using an emulator, but was not able to copy paste in my Hobbyist License. I suspect Putty pasting too quickly, so I had to get the license script on the OpenVMS, without using the network. In this article you'll learn some OpenVMS filesystem history, how OpenVMS handles line endings and in the end I get my license installed by creating an ISO with the script on it.
Recently I removed all Google Ads from this site due to their invasive tracking, as well as Google Analytics. Please, if you found this content useful, consider a small donation using any of the options below:
I'm developing an open source monitoring app called Leaf Node Monitoring, for windows, linux & android. Go check it out!
Consider sponsoring me on Github. It means the world to me if you show your appreciation and you'll help pay the server costs.
You can also sponsor me by getting a Digital Ocean VPS. With this referral link you'll get $100 credit for 60 days.
-SYSTEM-W-DATAOVERUN, data overrun
When pasting in my ISO using simh and a VAX system, I had no issues. When trying it on the Alpha and putty, it errors out:
%DCL-W-IVVERB, unrecognized command verb - check validity and spelling \$\ $ $ /ISSUER=DEC - %DCL-W-NOCOMD, no command on line - reenter with alphabetic first character $ /AUTHORIZATION=H %RMS-F-RER, file read error -SYSTEM-W-DATAOVERUN, data overrun
On a few forums it was suggested to create an ISO with the license script on it, mount that and execute the script from there. Since the installed system has no network yet (I'm having a lot of issues with Windows and bridging in Virtualbox) I cannot just copy over the file via FTP.
Create the ISO
On Ubuntu and Debian you can
apt-get install genisoimage. Place the License
PAK script in a new folder, in my case the folder is named
license. The PAK
script is named
a.com. Generate the ISO:
genisoimage -V license -o a.iso license
-V license is so that the ISO label is
In the case of AlphaVM the disk drive is
When OpenVMS is booted up, in my case it complains about the licenses:
Welcome to OpenVMS (TM) Alpha Operating System, Version V8.4 Username: system Password: %LICENSE-I-NOLICENSE, no license is active for this software product %LOGIN-S-LOGOPRCON, login allowed from OPA0: Welcome to OpenVMS (TM) Alpha Operating System, Version V8.4 $
Find out what your cdrom device is:
$ SHOW DEVICE Device Device Error Volume Free Trans Mnt Name Status Count Label Blocks Count Cnt REMY1$DKA0: Mounted 0 REMY1 5419104 307 1 REMY1$DKA400: Online 0
In my case
DKA400. You can find more information by specifying it to the
$ show device dka400 /full Disk REMY1$DKA400:, device type EmuVM CDROM ISO image, is online, file-oriented device, shareable, available to cluster, error logging is enabled. Error count 0 Operations completed 268 Owner process "" Owner UIC [SYSTEM] Owner process ID 00000000 Dev Prot S:RWPL,O:RWPL,G:R,W Reference count 0 Default buffer size 512 Total blocks 256 Sectors per track 128 Total cylinders 1 Tracks per cylinder 2
Let's try my linux-mindedness and see if mounting is the same. First create a folder to mount the device on:
$ CREATE /DIR [.MNT]
Try to mount the device:
$ MOUNT DKA400 [.MNT]
And nope, no luck this time:
%MOUNT-I-OPRQST, incorrect volume label %MOUNT-I-OPRQST, Please mount volume [.MNT] in device _REMY1$DKA400:
Different variations on this command with the ISO label did not help.
Looking around the OpenVMS
HELP for mount I found the
$ HELP MOUNT /OVERRIDE
Snipping the relevant part:
IDENTIFICATION Overrides processing of the volume identifier in the volume label. Use this keyword to mount a volume for which you do not know the label, or for an ISO 9660 volume whose label is not unique in the first 12 characters. Only the volume identifier field is overridden. Volume protection, if any, is preserved. The volume must be mounted /NOSHARE (either explicitly or by default). The /OVERRIDE=IDENTIFICATION qualifier is incompatible with the /GROUP and /SYSTEM qualifiers.
Let's try that since I'm not able to figure out this volume label:
$ MOUNT /OVERRIDE=IDENT DKA400 %MOUNT-I-WRITELOCK, volume is write locked %MOUNT-I-CDROM_ISO, license: (1 of 1) , mounted on _REMY1$DKA400:
Lets see if the
SHOW DEV output shows it as mounted now?
$ SHOW DEV DKA400 /FULL Disk REMY1$DKA400:, device type EmuVM CDROM ISO image, is online, allocated, deallocate on dismount, mounted, software write-locked, file-oriented device, shareable, available to cluster, error logging is enabled. Error count 0 Operations completed 267 Owner process "SYSTEM" Owner UIC [SYSTEM] Owner process ID 00000216 Dev Prot S:RWPL,O:RWPL,G:R,W Reference count 2 Default buffer size 512 Total blocks 256 Sectors per track 128 Total cylinders 1 Tracks per cylinder 2 Volume label "license" Relative volume number 1 Cluster size 0 Transaction count 1 Free blocks 0 Maximum files allowed 0 Extend quantity 0 Mount count 1 Mount status Process ACP process name "DKA400CACP" Volume Status: ISO 9660. Members of this volume set are REMY1$DKA400: (rvn 1).
So now for the easy part right? Go into the device folder and execute the script. Can't go wrong here.
But oh yes we can go wrong. Lets see what happens if we
SET DEFAULT on
OpenVMS) into the device:
$ SET DEFAULT _REMY1$DKA400: $ DIR %DIRECT-E-OPENIN, error opening REMY1$DKA400:[SYSMGR]*.*;* as input -RMS-E-DNF, directory not found -SYSTEM-W-BADIRECTORY, bad directory file format
Again an OpenVMS error message. Not sure why, but I guess I did something wrong.
, the Master File Directory
The HP documentation is not very helpfull on this part. I had to go on my local ebook seller and buy this book since Google Books doesn't allow copy pasting. But, reading through it, it seems to be a good book for me. Shame it cost me EUR 30. A few hours of reading later I realised I was busy with an ISO mount.
Files11 is the file system used by OpenVMS. As one might imagine, the file system is that part of an operating system that controls the storage and manipulation of files.
ODS2 stands for OnDisk Structure, Version 2. It describes the actual layout of files on the disk, including all control information needed to interpret the contents of the disk. Later versions of OpenVMS Alpha (and presumably, the upcoming Itanium version) also support a newer Files11 structure level, ODS5. ODS2 and ODS5 volumes may exist on the same system, so long as the system is running a compatible version of OpenVMS.
On ODS2 disks, the toplevel directory is called . This toplevel directory is also known as the "MFD," or "Master File Directory."
New users may find it curious that directory listings of the  directory include the file 000000.DIR. This is because the MFD includes an entry for itself, making it appear that the MFD "contains itself."
Why Call It 000000?
The unlikelysounding name 000000 has a historical basis. On much older Digital systems, the directory name for each user took the form [gggmmm], where ggg was the UIC group number for that user, and mmm was the member number. So, 000000 represented the MFD. (Try it: as of OpenVMS V7.3, the command DIRECTORY [0,0] still works as a substitute for DIRECTORY  if you have the appropriate privileges.)
(Duffy, M. (2003). Getting started with openVMS system management: a guide for (new users. Boston: Digital Press, p. 76-78)
When we execute the command in the correct folder it does show my script:
$ SET DEF _REMY1$DKA400: $ DIR _REMY1$DKA400: Directory _REMY1$DKA400: A_COM.;1 Total of 1 file.
Execute a DCL script
From the documentation:
@ (Execute Procedure) Executes a command procedure or requests the command interpreter to read subsequent command input from a specific file or device.
./ as in linux.
Do specify the version number, otherwise it will fail:
$ @A_COM %DCL-E-OPENIN, error opening REMY1$DKA400:A_COM.COM; as input -RMS-E-FNF, file not found
My license script did fail nontheless:
$ @A_COM.;1 %DCL-W-IVVERB, unrecognized command verb - check validity and spelling \RODUCT\ %DCL-W-IVVERB, unrecognized command verb - check validity and spelling $\ %DCL-W-UNDSYM, undefined symbol - check validity and spelling \APR\
I re-downloaded my license PAK and created a new ISO. That did not help. I
suspected it had something to do with line endings as I was using Windows to
create the text file. Opening the file with
EDIT comfirmed my suspicion:
A search around the web lead me to the OpenVMS Wizard. Read the page for the full answer and explanation. I've snipped the relevant parts here:
This depends on the current format of the file. The OpenVMS Wizard assumes that the reason for the CR characters is that this is a STREAM file copied from Microsoft MS-DOS or Microsoft Windows system, as this is a common reason for seeing apparently extraneous CR characters embedded within a file. RMS recognises three types of stream files: 1) STREAM_LF - in which records are delimited by an LF character 2) STREAM_CR - in which records are delimited by a CR character 3) STREAM - in which records are delimited by an LF character, a CR+LF character pair, or an FF or VT character Often, text files from MS-DOS or Windows systems will have records ending with a CR+LF pair. When such a file is copied onto a VMS system as a STREAM_LF file, the CR character becomes part of the data stream and therefore will appear at the end of each record. You can check if your file falls into this category with the following two commands: $ DIRECTORY/FULL filespec Check that the Record Format is Stream_LF: Record format: Stream_LF, maximum 0 bytes, longest 0 bytes and that the records contain a CR+LF pair. Ensure you dump sufficient blocks to see the ends of a number of records $ DUMP/BLOCK=COUNT:1 filespec 31310962 65462031 300A0D38 312E3009 .0.18..01 Feb.11 000020 ^^^^ 0A0D is a CR+LF pair (remember that the hex dump reads right to left!). If your file satisfies BOTH these conditions, you have two choices for removing the CR from your data. The first doesn't actually remove the character, it just tells RMS that the CR is part of the record delimiter: $ SET FILE/ATTRIBUTE=(RFM=STM) filespec Note that this does not involve any conversion or copying of data. The DIRECTORY/FULL command will now display the record format as: Record format: Stream, maximum 0 bytes, longest 0 bytes and applications reading the file will no longer "see" the embedded CR character. If you really must physically remove the CR character, you can now do so with a simple CONVERT command: $ SET FILE/ATTRIBUTE=(RFM=STM) filespec $ CONVERT/FDL=SYS$INPUT filespec newfilespec RECORD FORMAT STREAM_LF $ The first command tells RMS that the record relimiter is CR+LF as before. The second performs a conversion of the file to STREAM_LF format, so when the new file is created, records will be delimited by a single LF character.
Since the CDROM is mounted read only we cannot change the file spec:
$ SET FILE/ATTRIBUTE=(RFM=STM) A_COM.;1 %SET-E-READERR, error reading REMY1$DKA400:A_COM.;1 -SYSTEM-F-WRITLCK, write lock error
Copy the file over to your home folder:
$ COPY A_COM.;1 SYS$LOGIN
Change to that folder:
$ SET DEF SYS$LOGIN
Retry the command, which should work now:
$ SET FILE/ATTRIBUTE=(RFM=STM) A_COM.;1
In my case, it now looks correct in the editor:
But would it actually execute?
%SHOW-I-NOLICENSE, no licenses exist %LICENSE-I-DISABLED, ACMS has been disabled %LICENSE-W-NOENT, no license was loaded for this product - DEC ACMS %LICENSE-I-ENABLED, ACMS has been enabled %LICENSE-I-LOADED, DEC ACMS was successfully loaded with 0 units %SHOW-I-NOLICMATCH, no licenses match search criteria [...] %LICENSE-W-NOENT, no license was loaded for this product - DEC X500-DIRECTORY-SERVER %LICENSE-I-ENABLED, X500-DIRECTORY-SERVER has been enabled %LICENSE-I-LOADED, DEC X500-DIRECTORY-SERVER was successfully loaded with 0 units Completion of PAK Load Command File....
Yay! It works and my licenses have been setup.
I can now check my activated licenses:
$ $ SHOW LICENSE Active licenses on node REMY1: ------- Product ID -------- ---- Rating ----- -- Version -- Product Producer Units Avail Activ Version Release Termination ACMS DEC 0 0 100 0.0 (none) 1-APR-2019 ACMS-REM DEC 0 0 100 0.0 (none) 1-APR-2019 ACMS-RT DEC 0 0 100 0.0 (none) 1-APR-2019 [...] VMSCLUSTER DEC 0 0 100 0.0 (none) 1-APR-2019 VOLSHAD DEC 0 0 100 0.0 (none) 1-APR-2019 X25 DEC 0 0 100 0.0 (none) 1-APR-2019 X25-CLIENT DEC 0 0 100 0.0 (none) 1-APR-2019 X500-ADMIN-FACILIT DEC 0 0 100 0.0 (none) 1-APR-2019 X500-DIRECTORY-SER DEC 0 0 100 0.0 (none) 1-APR-2019
When it's not DNS it's line endings. In this small adventure I learned the OpenVMS mount command with a few options. Furthermore, it's not only between Windows and Linux that line-endings cause issues, even in OpenVMS.Tags: alpha , blog , dec , decus , es40 , itanium , openvms , pdp , simh , vax , vms