My Experience…
Over the years of using the public domain version of MVS 3.8J (e.g. tk3 or tk4-8), I encountered a halt state during the overall MVS shutdown process. The purpose of this post is to share my resolutions when JES2 encounters a ‘holding’ state when attempting to normally terminate (bring down) MVS 3.8J.
Before continuing, it is suggested obtaining a copy of the following for reference purposes:
- GC23-0007-1 Operators Library OS/VS2 MVS JES2 Commands
- Hercules – User Reference Guide (for your version of Hercules emulator)
When shutting down JES2, via the SHUTDOWN automated procedure or manual procedure using ($P and $PJES2), the process logs specific eye-catching console messages leading to a conclusive message designating JES2 has shutdown as highlighted below:
. . $HASP099 ALL AVAILABLE FUNCTIONS COMPLETE . $HASP000 SYSTEM DRAINING . $HASP395 INIT ENDED $HASP395 INIT ENDED . IEE043I A SYSTEM LOG DATA SET HAS BEEN QUEUED TO SYSOUT CLASS L . . $HASP085 JES2 TERMINATION COMPLETE <<--- target message . .
However, when nothing follows (after patiently waiting…), message SYSTEM DRAINING, or even more concerning, message JES2 NOT DORMANT — SYSTEM NOW DRAINING, some devices may be holding up the JES2 termination process!
. . $HASP099 ALL AVAILABLE FUNCTIONS COMPLETE . $HASP000 SYSTEM DRAINING . . $HASP000 JES2 NOT DORMANT -- SYSTEM NOW DRAINING . . . . . .
However, message $HASP085 JES2 TERMINATION COMPLETE does not appear after waiting patiently. Now, growing impatient….
What’s Wrong?
My personal mainframe is ‘stuck’ at the moment !!
Typically, this occurs when a JES2 device is not in a drained state!
Use the following command console command to list statuses of all unit record devices (readers, punches, printers, lines) as depicted below:
$DU,ALL
. . $DU <<--- console command . $HASP000 READER1 00C INACTIVE <<--- command response $HASP000 READER2 10C INACTIVE $HASP000 READER3 20C INACTIVE $HASP000 READER4 *** DRAINED $HASP000 PRINTER1 00E INACTIVE $HASP000 PRINTER2 00F INACTIVE $HASP000 PRINTER3 30E DRAINED $HASP000 PUNCH1 00D INACTIVE $HASP000 LINE1 *** DRAINED (RMT1) . .
As mentioned, all JES2 devices must be DRAINED to shutdown normally. Therefore, different actions may be required based on device type (i.e. reader vs punch).
If a reader, punch or printer device is not drained, issue a $P (stop) command on the specific JES2 device (i.e. RDR1, RDR2, PUN1, PRT1, LINE1, etc.) to retry stopping the device as depicted below:
. . $P PRT1 <<--- console command . $HASP000 OK <<--- command response $HASP097 PRINTER1 IS DRAINED
If a reader device continues to exhibit an ACTIVE status or INTERVENTION REQUIRED message on the MVS console (or Hercules console), submit a dummy JOB to the specific reader to eliminate the device intervention. Most tk3 or tk4 systems have a DUMMY job in the JCL directory.
A quick and easy method to submit an ascii job deck to MVS uses the Hercules console to issue the following command:
DEVINIT xxxx JCL/dummy eof ascii trunc | | | | | +----- location of dummy JCL file (case sensitive on Linux systems) | +------------- MVS device address for JES2 device (4 bytes)
Refer to the Hercules user guide for explanation of the DEVINIT command.
More information on submitting jobs to MVS 3.8J can be found here.
If a line device is not drained, issue a $P (stop) command on the specific JES2 device (i.e. LINE1, LINE2, etc.) followed by a $E (restart) command as depicted below:
. . $P LINE1 <<--- console command . $HASP000 OK <<--- command response . . $E LINE1 <<--- console command . $HASP000 OK <<--- command response $HASP097 LINE1 IS DRAINED .
Closing
The above is not an all-inclusive solution set, but merely my personal experience resulting in a positive outcome in terminating JES2 successfully.
Please use the comment box below to communicate any suggestions, improvements, corrections or issues.
If you would like to share your personal solutions used to clear JES2 device obstacles during shut down of JES2, please use the contact us link on the menu bar.
Enjoy your MVS38J mainframe!
Larry Belmontes