Usermod ZMD0002, TK3 and TK4-
This usermod can be applied to TK4- update 08 and TK3.
It cannot be applied to later updates based on TK4- from other sources
(such as Rob Prins updated version of 20220914) as they may
(or do in the version Rob has updated)
have had additional PTFs added that break the PRE/SUP chain needed for SMP for
this usermod,
As a workaround for that I have created this job here to
backout the two usermods Rob added
in his 20220914 release; allowing my usermod to work correctly when installed.
The two usermods are TMVS16 (which affected IEE3503D) and TMVS17 which must
be removed to remove TMVS16. I can find no information on what these are.
So why this usermod then
OS/VS2 does not support MPF, which is the modern way to define additional commands.
My solution for additional display commands is to create a usermod to update IEE3503D. Immediately prior to where it would write the 'invalid command' message in response to a display command mvs3.8j it now attempts to locate program MID3503D to see if unknown commands are handled there, the program will return with either command handled or to just follow normal unknown commoand logic in IEE3503D.
- if the program MID3503D is not in the linklist a 806 error is written and the normal display command error message is written
- if the program MID3503D is in the linklist it will be branched to in order to see if it can handle the additional commands
- if it can handle the command, it will and return rc=0000 to IEE3503D which will exit normally, if it also does not know about the command it will return rc=0004 and IEE3503D will display the normal unknown command message
The benefits of this method are
- SMP4 is only needed to implement the initial modification to IEE3503D, after which additional commands can be added without SMP, plus the MID3503D program will only be requested for display commands OS/VS2 does not know anything about so has no impact on existing operation
- the MID3503D module is optional (if you can live with the OS generated 806 program not found message when you mistype a command). So if at any time you screw up implementing a new command it can just be deleted from the linklist library (and ipl of course as OS/VS2 won't notice it has gone until then)
-
Adding additional console display commands is simply by modifying the MID3503D
program to test for them and assembling it into a linklist library.
My usermod is cleaner than trying to stuff additional code into IEE3503D,
it just modifies IEE3503D
to link to an external module MID3503D to try to resolve extra commands
rather than polluting the IBM supplied code with attempts
to handle any additional commands.
And if you really screw up simply deleting or replacing MID3503D
fixes it, no usermods to backout if you create a bad command.
Files
- The SMP4 job to update IEE3503D with the code to branch to MID3503D is Usermod ZMD0002, which should work with TK3 and TK4-
- And as always if you want to back it out there is a rollback job to backout the SMP usermod
- And there is a working example of how to implement the MID3503D program below
Example MID3503D program
This is an
example working implementation of MID3503D.
The symbol table in this program is pretty full, adding new functions will
probably require emoving some of the example ones.
It provides
- 'D APF', display APF dataset list
- 'D SMF[,D]', display SMF datasets (with the usage fields populated)
- 'D IPL', display IPL information and time of last IPL
- 'D TIME', displays the time with yyyy/mm/dd (instead of the mvs 'D T' response of yy.ddd), and includes the day name
Credits for the example MID3503D program above
Code has been examined, extracted and tweaked from the below resources.
- me of course, for the months of research trying to find out what ibm program needed modifying, and the IPLs (easily in three digits) backing out mistakes when I was modifying other modules. Plus the date calculation code has been taken from sections of my date library code also available on this site
- CBT486 file 887, a non-TK3 compatible SMP install for a buggy replacement of IEE3503D,
but it provided some usefull code
- It provided the apf dataset list code used in my sample MID3503D code here
- It also had a stub (in progress apparently) for the 'd smf' code which I
changed quite a bit
- lots of changes to stop it abending and filling up system dump datasets
- changed it to return 'd smf,o' output to the correct requesting console instead of always to console CN=00 (this command is only available in example one however)
- it only has placeholders in the output for smf dataset usage, which is also the current state of this example one, I have fully implemented the dataset usage in example two
- CBT249 file 058 DSAT member provided the code example to calculate the number of tracks allocated and used by the SMF datasets. The DSCB format3 mapping from that file is also used. That was used to provide the missing space used fields for the smf dataset display in example two.