Problem solve Get help with specific problems with your technologies, process and projects.

What IBM MVS commands will safely shut down a stuck task?

Mainframes don't always operate as they should. In extreme circumstances, the FORCE command can help close down a stuck program.

I'm an Oracle database administrator with a stuck OSDI database service STC on the mainframe. We're running Oracle...

on MVS using VSAM linear data set, on OS/390 v2.10. We're having a problem with the Oracle interface's database service started task. The OSDI DB Service STC doesn't or can't shut down properly, and even though I've cancelled the STC, it remains.

I've used MVS command /cancel stcname... /cancel stcname,a=<asidx number> and purged it without success. Are there better IBM MVS commands to overcome this situation?

You may have done an initial program load (IPL) on the system by now, but the only choice you have at this point would be to try using the MVS FORCE command. FORCE ends the job that you name, whether started task or another job.

More mainframe troubleshooting

What to do when the mainframe IPL stalls

As the MVS System Commands manual warns, this mainframe command is a last resort and you might even have to re-IPL the system after using it. From personal experience and many years of working with MVS, I have only seen a FORCE command result in needing to IPL the system on one or two occasions. However, it is a possibility, especially when using the command on subsystems.

If you ever run into this situation again, take a console dump (DUMP command) of the hung task to send to the vendor so they can try and determine why the task would not shut down normally. This should be done prior to attempting to use the FORCE command.

For more information, see MVS System Commands.

Dig Deeper on IBM system z and mainframe systems