April, 2025
There are five Unit Record output devices active in the MVS system generated following my instructions:
In the Hercules' configuration file distributed in my installation objects archives (mvsInstallationResources.tar.gz for Linux users, and mvsInstallationResources.zip for Windows users), you will find a Hercules' configuration file to be used for the target MVS 3.8j system. It is named mvs.cnf and should be located in the conf subdirectory. The lines in that file that control how Hercules manages these Unit Record devices are:
000D 3525 pch00d.txt ascii # JES2 000E 1403 prt00e.txt # JES2 000F 3211 prt00f.txt # JES2 001D 3525 pch01d.txt ascii 0015 1403 mvslog.txt # hardcopy of master console
It is my belief that most members of the Hercules/MVS community will elect to install an add-on program to manage output from the printer devices via a socket connection. That is a much more robust solution for output to the addresses at x'00E' and x'00F', and allows separation of printed output by output class and job name. The two add-on programs I am aware of that provide these functions are vpwpc (Virtual Paper Writer, provided by Enrico Sorichetti) and HercPrt (a product of Software Development Labs). I currently use vpwpc and have used HercPrt in the past; both do a great job managing your printer output. If you plan to utilize one of these solutions for your printer output, you may elect to only apply time stamps to the other devices' host OS files. But if you will not be using one of these programs, or will be adding those later, you may also apply time stamps to the printer devices' host OS files as a means to avoid overwriting the printer output until you choose to implement another solution for those emulated devices' output.
I would recommend that it is not necessary to add a time stamp to the punch device at address x'01D'. The reason is that I set that address up for use in transferring binary content to the host OS, and I have only ever used it to write output to a specific known host OS filename, by using the Hercules' devinit command to name the output file on the host OS prior to producing output. It is difficult to edit binary files on a host OS, so it would be even more complicated to attempt to separate binary (EBCDIC) output concatenated from several output jobs from MVS.
The most important file to save the contents of is the hardcopy log at address x'015'. If you are attempting to diagnose problems, it will be useful to have the logs saved from at least the last several times MVS was IPLed.
There are two parts to implementing the time stamps on the host OS files for the emulated Unit Record devices.
First: Hercules must be started with a bash script (under Linux) or a batch command file (under Windows) to create an environment variable with the date/time string to include in the host OS file name. Dave Trainor sent me the Linux bash script: ipl_mvs; and I have created a Windows batch command file: IPL_MVS.BAT that performs the same function under Windows. Save the version that is appropriate for you in your mvs subdirectory. Linux users will need to make the script executable with the command: chmod +x ipl_mvs.
Second: modify the Hercules' configuration file contained in mvs.cnf in the conf subdirectory to add the date/time stamp into the host OS file name:
#000D 3525 pch00d.txt ascii # JES2 000D 3525 pch00d_$(TSTAMP).txt ascii # JES2 #0015 1403 mvslog.txt # hardcopy of master console 0015 1403 mvslog_$(TSTAMP).txt # hardcopy of master console
Above I have shown the modifications to the two Unit Record devices I believe will be most beneficial to save from each execution of MVS. I left the original line as a comment (# in column 1) and placed the modified line beneath the original (commented) line.
Here is an example of the host OS file names generated after these changes:
mvslog_2025-04-05_14-18-17.txt mvslog_2025-04-05_14-58-25.txt pch00d_2025-04-05_14-18-17.txt pch00d_2025-04-05_14-58-25.txt
Following modification of the Hercules' configuration file, you will need to start Hercules with the script, either ./ipl_mvs for Linux users, or IPL_MVS for Windows users.
There are no additional changes required. After the modification, MVS output to the modified Unit Record devices will be saved for each Hercules/MVS session. Periodically you will probably need to 'prune' the collection, or it will grow to consume an inordinate amount of storage space on your host computer.
I hope that you have found my instructions useful. If you have questions that I can answer to help expand upon my explanations and examples shown here, please don't hesitate to send them to me:
This page was last updated on April 08, 2025 .