Source code available for download for MVS3.8J systems
This is mainly the software I have written to make my life easier
when using hercules and MVS 3.8J for my own system(s) at home. All have been run under
Turnkey3 and TK4- distributions.
At the end of this page I include software I did not
write but that I have modified to run under the older MVS3.8J operating system.
The downloads available from this page may contain unstable 'enhancements in progress' versions, apart from possibly not working as expected don't expect documentation to be up to date on these copies unless I'm getting ready to push a new stable version to github. Stable versions of key files and utilities are on GitHub but the latest enhancements and any bugfixes will appear here before the appear on github.
I am making major changes to the source code here (in place without testing) to insert unique
message numbers into iWTOs for all the important programs I use; the source code here should
be considered unstable until I have tested them all. While the only change is to change the
message text in many programs this has the potential to push messages into the continuation
character area so I need to test re-assembly of each one I have been changing.
In progress is a new file that will be available that will document every message number :-)
My Software
My KEY Automation tools
The following tools were written to make running my MVS 3.8J system more of a hands-off experience. We have
- My MMPF Console Message Automation STC which allows automation of console action messages without needing to update IEECVXIT. As it runs as a STC it can access files and accept a modify command, which means yes you can change rulesets without IPLing with a simple F MMPF,MMPF=nn. Message parsing (&WORD1-&WORD20) allowed in the rulesets, easy now isn't it.
-
My Tape Mount Automation program V3, never have
to manually devinit a local site tape mount request again.
Manages both named tape and scratch tape mount requests.
The latest and all future versions require my MMPF message automation
utility, I have removed support for it to be triggered from IEECVXIT.
An archived copy of the old unsupported V1 is available if you want to run that from IEECVXIT but it is not upgradeable and will not get bug fixes. - My program to issue commands to the hercules CP using DIAG8. I wanted something with source instead of depending on the object only HERCCMD used by most TK3 users.
- A program I use to allow my other programs to issue console commands via svc34 which uses a RAKF facility SVC34 rule... most TK3 users would use the supplied BSPOSCMD but that command is tied to the RAKF facility SVC244 rule (in TK4- anyway) for an unknown reason, so I block that. As it can only be used by authrised programs anyway on 3.8J it is probably of limited use to you; the use to me is that I get activity logged in a consistent format
- The job scheduler I currently use is also available in my datetime program library mentioned in the callable program section below
Some other Automation Tools
These are programs that are working, and I am using them. They are also however programs I intend to improve as time goes by.
-
My batch job queueing program for daily batch.
Basically all my daily/weekly
batch jobs are submitted to JES2 in a held state, this program is called as the last step
of each job to, based on a control file, release every waiting job dependant upon the
job that just finished if it was MAXCC=0 (or MAXCC < override parm) or raise an alert if MAXCC unexpected or an ABEND.
I will be replacing this, I intend to write a proper scheduler one day - My single minded task watcher. I wrote this mainly so I could play with writing a STC and figure out the F/P command interface. All it does is have a control file of STC names that should be in a desired state of UP or DOWN (with the associated commands to achieve the objective) and keep them in the desired state. Not really that usefull but shows how to see if a job is on the system as well as a simplified use of passing commands to a STC. This is now obsolete, the restarting tasks function has been merged with MMPF but if you want example code on how to see if a task is running this is probably the most uncluttered example I can provide
-
Disk space and file usage monitoring.
DASDSCAN - scan all online disks to see if they are getting low on free space. Also where possible will check all files on each disk to make sure they are not getting close to the mvs38j 16 maxextent limit.
MDFILCHK - check datasets selected via sysin cards to see if they are starting to reach max extents and if they are will trigger customised recovery actions to resolve the issue
MDMOVEDS (move dataset) program A program I use to "batch" move datasets by wildcard prefix from dasd packs they should not be on to packs they can reside on. As I allow "guest" users on the site I use this to ensure that if they create datasets on packs they are not supposed to use the datasets are relocated to packs they should be on.
Callable Utility Programs required by many of my programs
The programs in this section are programs that I call from my other programs, to the point that many of my utilities will not assemble unless you have these installed.
-
A library of programs (and interface macros) to return anything you
could ever want to know about a date (last update provides IPL date and time).
More info on my
datetime program library and
the download link is available.
This will be a continously growing library as I encounter more functions
I need so check back occasionally.
Functions in here are designed to only be called by other programs; not from JCL; which is why macros are provided to make it really simple to use it.
It also includes a fully functional job scheduler to show how the library can be used.
Assembler Macros
These are macros that are currently standalone, and do not require any of my current libraries. They are designed specifically for MVS3.8J
- EVENTHUB, multitheaded coding via a macro, a macro that allows a MVS3.8J assembler program to use the COMM area, manage multiple outstanding WTORs and multiple outstanding timers using an event list. Enables very readable assembler code as every 'event' can be attached to its own 'hander'(named code location/procedure) and is designed to be easy to use.
- My standard VSAM database I-O macro, which generates all the 100s of lines of assembler code needed to perform record updates on a keyed VSAM file with one simple macro call
- my number display macros (use save as rather than copy/paste in case a web browser mangles some of the characters) todec3,todec8,bin2hex,strtobin. Primary use is to convert binary numbers to displayable text in decimal or hex. Also a simple routine to convert a string input number to binary. I primarily use these as debugging aids, but there is only so many copy/paste of code you can do before you decide you need to put them im macros. And of course a simple program you can use to test the macros work as expected. The test program.
Demonstration programs
These are some code blocks/demos I had real trouble tracking down documentation on, so have started putting the resolutions to my issues all here.
- How to cancel a WTOR based on a timer in MVS 3.8J
- How to from a program running as a normal jobstep in a batch job test the completion codes from all previous job steps in that batch job.
Miscellaneous Usefull Stuff
- WTORPGM - issues a WTOR and expects U or C as a reply,
a SYSIN card stream can be used to write out WTO's before the WTOR to explain what
the prompt is for. Returns CC=0 for a U, CC=8 for a C
Obsoleted byASKOPER from the CBT249 overflow tape file 131... that I have enhanced considerably over what was shipped - WTOBATCH - write a whole bunch of WTOs from the SYSIN DD
- COBRENUM - renumbers MVT COBOL members, or initially numbers them
- MDWAIT - used in my daily batch programs to just wait until a jobname has finished running before moving to the next step (ie: wait until NET ends if the batch job is to play with VTAM datasets)
- BKBYVTOC - (backup by VTOC) to assist in automating backups. It will generate backup jobs to backup to tape all PO and PS format datasets on the disk volumes you select. Backup file listing placed at tape file position 001 on every tape used. Requires my date utility program mentioned in the 'Callable Utility Programs section of the page above
- DUMPPDS - dumps out PDS files, or LRECL 80, as a IEBUPDTE job deck that can be used to recreate the members. Written before I found OFFLOAD was provided with TK3 that does pretty much the same thing.
-
IPLREASN - a simple
reason for IPL logger that logs the IPL time, IPL volser and CUU used,
system SMFID and whether the IPL was CLPA, warm or quick;
so I can keep track of what I was doing that broke the system.
Currently requires my date utility program mentioned in the
'Callable Utility Programs section of the page above.
Provides some code that may be of interest if you have been trying
to find those fields.
I use this instead of the default reason prompt (that I have disabled) so I can record additional info such as whether it was a clpa or warm start so I can better keep track of when I installed (or had to backout) stuff I'm playing with in the lpa/mlpa space. - DUPTIME - this is from CBT249.FILE353(TSO033) on the TK3 distribution that I have cleaned up and also updated to display the date and time of the last IPL which also requires my date library that you can find above.
-
JOBCONT2 - job card continuation.
This program is used to append a continuation card to a jobs JOB card(s)
containing whatever was passed as a PARM to the program.
My use for it is that after installing RAKF I did not want my important batch jobs running in the default batch class, they used to be submitted to INTRDR by a PROC using IEBGENER... they are now submitted via the same PROC but using JOBCONT2 instead, which provides a PARM containing the production batch user=/password= data that gets added to the jobcards, so I did not need to change any of my batch jobs (and as the proc is RAKF protected so only started tasks can read it nobody can get the user/password).
My USERMODS for MVS3.8J
Use at your own risk :-).
- TK3 and TK4- compatible, a usermod to allow additional console display commands by simply branching to another program to test for them (no impact if you have not coded the additional program yet, sample provided). Details and download here.
-
TK4- only, the IEECVXIT required to support my automation
requirements (specifically tapeman and mmpf); it is tk4- only
as it merges the TK4- ZJW0006 usermod changes into it so it can
superceed that usermod. If you use mt MMPF application for message automation
on TK4- you will need this.
The TK4- usermod is available here; and the really complicated rollback job if needed is here, it is definately TK4- only.
It is not compatible with TK3; basically TK4- implemented a lot of changes to IEECVXIT and I have merged those into this usermod to avoid losing them in a TK4- test system... if you are using TK3 and need to update your IEECVXIT note that the key changes are (1) to detect a dataset in use lock on the tapeman dataset and use bsppilot to stop/sleep/start mmpf [so batch queries and updates can be performed on the tapeman datasets without user intervention] and (2) to cancel any job that gets a rakf deny on a tape voume to [to stop the job repeatedly asking for tapes], it is recomended you review the change list of the TK4- usermod and make appropriate changes in your TK3 copy of IEECVXIT
Linux utility programs
- My init.d script to start hercules and TK3 in a totally headless environment (you don't need to start hercules, telnet session, 3270 sessions; all you need to do is push the physical PC power on button and wait a few minutes). Even though it's running in a headless environment as the hardcopy/master/backup consoles are running in screen sessions you can attach/detach to them as needed. There is more information and the script itself here. This script (with a few tweaks to check for docker or kubernetes environments) is the template for what I use to run mvs38j in a container, so useful for any type of linux headless environment
- My printer interface pipe script which when used with the
unix pipe facility
now available to unix users of hercules will convert jobs sent to the printer
to both text and PDF files for each job.
The scripts and how to set them up
are covered in detail here.
May be worth a read even if you are just interested in how to convert a text file to a PDF file with a (cough) simple bash script. - I needed a utility to extract a DSORG=PS dataset from a TSO XMIT file because dasdload can only put DSORG=PO datasets onto a disk. I couldn't use XmitManager from cbttape.org as that won't run under Win7 64 bit; so wrote this.
Not my software, but modified to work on 3.8J
CBT files and Xephon magizine articles converted to VS2
- Schedule from xephon 1999-02 that I have made changes to in order to get it back-ported to TK3 MVS3.8J as documented in the "changes" member. Seems to be running OK now. For alternatives see my note on schedulers I have looked at. (note: I no longer use this, I use my own scheduler as supplied in the datetime library mentioned earlier on this page)
- was in progress, now archived is the ESG security system from CBT tape 429 file 165. Now RAKF is available on the CBT tapes I have stopped re-inventing the wheel and have started using RAKF. Archived the code I was working on here, not just because it took a lot of time but because I might still need some of it. The last snapshot notes and tape are here if you are interested. It isn't working yet, RAKF is so I have stopped re-inventing the wheel.
- ASKOPER from the CBT249 overflow tape file 131... which while it assembled cleanly as it on 3.8J I have gone and enhabced it quite a bit over what was shipped
- CT (copytape) from CBT249 overflow tape file 131. I have made no modifications to the source, this is just the JCL needed to assemble it directly from the contents of the CBT file, so you need a runing TK3 system with that file on it of course
Archives, old mainframe stuff probably not found elsewhere
I have managed to recover some of the old FBA picture files that used
to decorate the walls of computer centers. These are not as they once
were as they have gone through multiple conversions between ebcdic and ascii
(I was using them to practise prolog programming decades ago when that was the only
viable printer layout language) and I found them on some low density 3.5 disks I was
about to throw away.
To load them into my mvs3.8j system I had to write a script
to take the 133 byte lines and split them to two lines, then after uploading
those as 80 byte records had to write a quick 370asm to stich them back into
133 byte records, there were a few bytes dropped each time.
What is salvaged is here as an AWS tape image. The JCL to restore it
onto your system is below.
The JCL to restore it onto your system and
download the AWS virtual tape file