My Console Started Tape Devinit Command

This is designed to be used to issue a devinit command to mount tapes from the MVS console if you started hercules in daemon mode so have no access to the hercules interface to issue a devinit.

It requires either my MDDIAG8 (default as shipped) or the HERCCMD utility to issue diag8 commands, and the DEVITAPE program must be in an APF authorised library. Also you must have the DIAG8CMD ENABLE option in your configuration file.

As it's a gaping security hole the program I'm using is hard coded to only DEVINIT and only allows devices 480 and 481 (the first two tape units); it's kicked off as a MVS console command 'S TAPEUP,TAPE='CUU path-to-aws-or-het-tape-file'. Not ideal, but if you realise you need it the simple program is here. Make sure you change the target APF authorised program library and the proclib the proc used for the start command is placed into before installing it.

Be aware that commands issues on the MVS console are all converted to uppercase so tapes you want to mount manually using this utility must be uppercase filenames, in uppercase directory paths if you have them below the hercules root directory. The exception I have discovered is the hardcopy (telnet) console that does not uppercase the commands (a trap for young players), so you can use your telnet session (accessable under 'screen -r hardcopy' if you used my headless startup script to start your TK3 system) to mount mixed case aws/het files using this utility.
As I only need this utility for external tapes (all my site tapes are already automatically mounted for me by my tape management application) it is all I need so I will not be developing this further.

Of course the more secure alternative to this utility would be shutting down your MVS system, starting it manually in an interactive way, doing the tape devinits you need, shutting it daown again, and then bringing it up as a headless system again. But heck, ease of use, I added the new S TAPEUP option for my use.

Example of use

d u,tape,online
10.03.43           IEE450I 10.03.43 UNIT STATUS 429 
 UNIT TYPE STATUS  VOLSER VOLSTATE   UNIT TYPE STATUS  VOLSER VOLSTATE
 480  3400 O-NRD              /REMOV 481  3400 O-NRD              /REMOV
 482  3400 O-NRD              /REMOV 483  3400 O-NRD              /REMOV
m 480,vol=(SL,MARK02)
10.04.31 STC 3069  $HASP100 MOUNT    ON STCINRDR
10.04.31 STC 3069  $HASP373 MOUNT    STARTED
10.04.31 STC 3069 *IEF233A M 480,MARK02,,MOUNT,480
10.04.31 STC 3069  $HASP395 MOUNT    ENDED
10.04.31 STC 3069  $HASP150 MOUNT    ON PRINTER2        18 LINES
10.04.31           $HASP160 PRINTER2 INACTIVE - CLASS=Z
10.04.31 STC 3069  $HASP250 MOUNT    IS PURGED
d u,tape,online
10.04.44           IEE450I 10.04.44 UNIT STATUS 441 
 UNIT TYPE STATUS  VOLSER VOLSTATE   UNIT TYPE STATUS  VOLSER VOLSTATE
 480  3400 O-MTP   MARK02 PRIV/RSERV 481  3400 O-NRD              /REMOV
 482  3400 O-NRD              /REMOV 483  3400 O-NRD              /REMOV
s tapeup,tape='480 TAPES/MARK02.AWS'
10.06.28 STC 3073  $HASP100 TAPEUP   ON STCINRDR
10.06.28 STC 3073  $HASP373 TAPEUP   STARTED
10.06.28 STC 3073  DEVINIT 480 TAPES/MARK02.AWS 
10.06.28 STC 3073  HERCCMD - CMD  : DEVINIT 480 TAPES/MARK02.AWS
10.06.28 STC 3073  HERCCMD - SECURITY PRODUCT UNAVALIABLE, UNABLE TO CHECK AUTH
10.06.28 STC 3073  HERCCMD - RESP : AWS is a AWS Format tape file
10.06.28 STC 3073  HERCCMD - RESP : HHCPN098I Device 0:0480 initialized
10.06.28 STC 3073  $HASP395 TAPEUP   ENDED
10.06.28 STC 3073  $HASP150 TAPEUP   ON PRINTER2        28 LINES
10.06.28           $HASP160 PRINTER2 INACTIVE - CLASS=Z
10.06.28 STC 3073  $HASP250 TAPEUP   IS PURGED
d u,tape,online
10.06.36           IEE450I 10.06.36 UNIT STATUS 490 
 UNIT TYPE STATUS  VOLSER VOLSTATE   UNIT TYPE STATUS  VOLSER VOLSTATE
 480  3400 O       MARK02 PRIV/RSERV 481  3400 O-NRD              /REMOV
 482  3400 O-NRD              /REMOV 483  3400 O-NRD              /REMOV
u 480
10.06.52           IEF234E R 480,MARK02,PVT
10.06.52           IEE734I 480      NOW UNLOADED
d u,tape,online
10.06.58           IEE450I 10.06.58 UNIT STATUS 495 
 UNIT TYPE STATUS  VOLSER VOLSTATE   UNIT TYPE STATUS  VOLSER VOLSTATE
 480  3400 O-NRD              /REMOV 481  3400 O-NRD              /REMOV
 482  3400 O-NRD              /REMOV 483  3400 O-NRD              /REMOV

Yes you could, but shouldn't

Yes you could change the program easily to allow any HMC command to be entered rather than having all that messy code in there to check for tape devices and the hard coded devinit command. But you shouldn't do so, especially if you are not the only 'user' on your mvs system.