SNOBOL4 (CSNOBOL4 0.99.4) for OpenVMS VAX 7.3 -- kit, 12-OCT-2026 ================================================================== Douglas P. Fields, Jr. (symbolics@lisp.engineer) SNOBOL4, the string-processing language of Bell Telephone Laboratories (Griswold, Poage and Polonsky), as "C-MAINBOL, The Macro Implementation of SNOBOL4 in C", version 0.99.4 of 11-AUG-1997, by Philip L. Budne (later CSNOBOL4): the Bell Labs SIL (SNOBOL4 Implementation Language) version 3.11 of 1975, translated into C. Built on OpenVMS VAX V7.3 with Compaq C V6.4, with VMS-specific functions added (process, system and device information, logical names, wild-card file searches, RMS indexed files), as a BACKUP saveset with a DCL installer and a DCL uninstaller. The target machine needs no compiler. It is NOT Macro SPITBOL (R. B. K. Dewar's); it does have the SPITBOL extensions Budne added (HOST, EXIT, case folding, -INCLUDE ...). SNOBOL4 is in the public domain. The changes made for this kit are listed in section 6 and are mine, not Mr. Budne's. 1. FILES SNOBOL4_VAX_20261012.BCK The kit: 2,644,992 bytes (5,166 blocks), 399 entries (375 files and the directory files), 4,283 blocks installed. SNOBOL4_INSTALL.COM Installer. SNOBOL4_UNINSTALL.COM Uninstaller. SNOBOL4_VAX_20261012_LIST.LIS BACKUP/LIST of the saveset: every file, with size and date. snobol4-0.99.4-openvms-vax-source-kit-20261012.zip The original distribution (snobol-0_99_4.tgz, unmodified), our changes as diffs and whole files, the build, kit and test procedures, the host tool and the recipe to recreate the kit from scratch. snobol4-0.99.4-openvms-vax-examples-20261012.zip Twelve example programs and their tests, with expected output. SHA256SUMS.TXT SHA-256 of every file above. README.TXT This file. You need the saveset and the two procedures. 2. REQUIREMENTS * OpenVMS VAX V7.3. (Tested on nothing else.) * SYSTEM, or another account with SYSPRV, to install or uninstall. * The system disk: the kit installs to SYS$COMMON:[SYSLIB.SNOBOL...] and nowhere else. About 11,000 blocks should be free while installing (the saveset, 5,166 blocks, plus the 4,283-block tree plus cluster rounding: an estimate from the sizes; the installer does not check). Nothing system-wide is changed: no startup file, SYLOGIN, DCLTABLES, system logical name, installed image, UAF record or quota -- and not STARLET. 3. INSTALLING 1. Copy the saveset and both .COM files into one directory on the system disk of the VAX. TRANSFER MODES MATTER. Send the .BCK saveset in BINARY. Send the .COM files as TEXT (FTP "ascii"). A procedure sent in binary arrives as 512-byte fixed records and DCL refuses it (%RMS-W-RTB). 2. A binary transfer loses the saveset's record attributes (FTP leaves it as fixed 512-byte records, RCP as Stream_LF). The installer puts them back itself; to BACKUP/LIST the saveset first, do it yourself: $ SET FILE/ATTRIBUTE=(RFM:FIX,LRL:32256,MRS:32256,RAT:NONE) - SNOBOL4_VAX_20261012.BCK 3. As SYSTEM, in that directory: $ @SNOBOL4_INSTALL or, over an existing installation of this kit: $ @SNOBOL4_INSTALL "" REPLACE The installer checks privilege and the saveset, restores the tree with BACKUP/VERIFY through a concealed root, sets owner and protection, writes a manifest of every file it installed (SNOBOL4_MANIFEST.LIS in the top directory) and runs a smoke test in a subprocess. It took 11.6 seconds on a simulated MicroVAX 3900 and 40 seconds on a VAXstation 4000/96. It refuses, changing nothing, without SYSPRV, for a missing saveset, or if the tree exists and REPLACE was not given. 4. Each user, at the prompt or in LOGIN.COM: $ @SYS$COMMON:[SYSLIB.SNOBOL]SNOBOL4_SETUP $ SNOBOL4 "-b" HELLO.SNO $ SNOBOL4 "-b" "-u" "argument" PROG.SNO "out" $ SNOBOL4 "-h" ! all options SNOBOL4_SETUP defines SNOBOL4_BIN, SNOLIB (the library directory for -INCLUDE) and the SNOBOL4 command, for that process only. DCL lower-cases an unquoted argument and SNOBOL4's options are case sensitive, so quote them. "-b" suppresses the banner; "-u" passes a parameter string (HOST(0)); "file" redirect INPUT and OUTPUT; "-r" reads INPUT from after the END statement. DEFINE/USER SYS$OUTPUT file works as well as ">file". 4. UNINSTALLING As SYSTEM, in the directory holding SNOBOL4_UNINSTALL.COM: $ @SNOBOL4_UNINSTALL CHECK ! report only, changes nothing $ @SNOBOL4_UNINSTALL ! remove SNOBOL4 It deletes only files the manifest lists, one explicit file;version at a time, and only if each still has the size and revision date it was installed with; then the directories left empty, deepest first, then the manifest. Anything else in the tree stays and is listed ("kept (changed)", "kept (not empty)"). The exit status is 4 if anything was kept. It refuses, changing nothing, if the manifest is missing or damaged. A second run says "not installed". Tested many times on simulators (the lifecycle test, section 8), and on a VAXstation 4000/96: CHECK found "would remove 375 files, keep 0, 0 already missing". 5. CHECKING THE INSTALLATION As an ordinary user, after SNOBOL4_SETUP: $ @SYS$COMMON:[SYSLIB.SNOBOL.EXAMPLES]RUN_TESTS runs 12 programs in [.SNOBOLTEST] under your login directory and compares each output with an expected file made by an independent Python implementation of the program's specification. It ends "PASS 12 of 12" (2.7 seconds on the simulator, 9 seconds on the VAXstation 4000/96). The 64 regression tests that came with the sources write files, so run them in a copy of the test directory: $ CREATE/DIRECTORY [.SNTEST] $ COPY SYS$COMMON:[SYSLIB.SNOBOL.SRC.TEST]*.*;* [.SNTEST] $ @SYS$COMMON:[SYSLIB.SNOBOL.SRC]RUN_SHIPPED_TESTS - SNOBOL4_BIN:SNOBOL4.EXE [.SNTEST] SHIPPED TESTS: PASS 64 of 64 (30 seconds on the VAXstation 4000/96.) Three of the shipped test files need 8-bit or CR data that the kit's text bundle cannot carry, and are reported "not in this tree"; the others pass. 6. WHAT IS DIFFERENT FROM THE DISTRIBUTION Eight changes, all marked as ours in SOURCES.TXT of the installed tree and in the source kit: 01 lib/auxil/getopt.c, lib/init.c the private getopt() is renamed (Compaq C has getopt()) 02 lib/vms/mstime.c clock() instead of the VAX C struct tbuffer / times() 03 lib/dummy/load.c, isnobol4.c the SIL procedure LINK is renamed (DEC C has link()) 04 lib/vms/sys.c (new) hwname() and osname() for HOST() 05 lib/vms/getredirect.c ">file" uses freopen(); creat() and dup2() wrote every byte as a record 06 lib/vms/vmscall.c (new), pml.h the VMS functions (below) 07 lib/io.c -INCLUDE finds files through the logical name SNOLIB: 08 lib/io.c fwrite(cp, len, 1, f): on a DCL-made record file every byte was a record The shipped VMS build files (config/vms/build.com, descrip.mms) describe the 0.91 sources of 1994, not these; build/BUILD_SNOBOL.COM and BUILD_SNOBOL.LIS replace them. Compiler flags: CC/NOLIST/NAMES=AS_IS /OPTIMIZE/DEFINE=(ANSI_STRINGS,NO_OFF_T)/WARNINGS=(DISABLE=IMPLICITFUNC). The VMS functions, in Budne's "Poor Man's LOAD" (external functions linked into the interpreter; LOAD() of shared images is not available on VMS): GETJPI GETSYI GETDVI TRNLNM GETTIM WAIT VMSMSG VMSSTATUS FINDFIRST FINDNEXT RMSOPEN RMSPUT RMSGET RMSDEL RMSREWIND RMSNEXT RMSCLOSE The RMS functions give a program an indexed file with fixed records and the first bytes as the primary key. Pipes work: INPUT(.X, 99, , '|SHOW TIME'). The specification is in lib/vms/vmscall.c. 7. KNOWN LIMITS * Not Macro SPITBOL; no VAX/VMS SPITBOL source exists in any collection I could find. * LOAD() of shared images is not available. * A DCL command line is limited to 255 characters and a DCL symbol to 1000: long arguments go in files. * Control lines (-INCLUDE) must start in column 1. * D_FLOAT only (the VAX C library's double). * Terminal and batch only. Not tried on Alpha or Itanium. 8. HOW IT WAS BUILT AND TESTED Built on a simulated MicroVAX 3900 (Open SIMH) running OpenVMS VAX V7.3 with Compaq C V6.4-005, from snobol-0_99_4.tgz (DECUS Symposium collection VMS LT98A; SHA-256 f5ca03e4d2fe276d470c38bb6e75815949ff53853a3ee084c1b5e8b0090ec0df). On the simulator, the recipe from the original sources to a tested kit takes 1 minute 7 seconds in one batch job: unpack the sources 4.2 s, build 55 modules and link 45.3 s, run the 64 shipped tests 8.1 s, make the kit 8.4 s. REBUILD.md in the source kit has the commands, results and hashes. Tests: RUN_TESTS 12 of 12; the shipped tests 64 of 64; the lifecycle test (install, refuse a second install, CHECK, change and add files, uninstall which keeps them, REPLACE, clean uninstall, reinstall) 21 of 21, on the simulator. The kit was installed system-wide on a VAXstation 4000/96 on 12-OCT-2026 and RUN_TESTS and the shipped tests passed there as an ordinary user. It has not been run on another real machine. The kit is not reproducible bit for bit (BACKUP records dates); the contents are.