Stop a looping CMS program on z/VM: HX, HI, HT, PA1 and BEGIN
To stop a runaway CMS program on z/VM, type HX and press Enter. HI ends only REXX execs. If CMS does not react, press PA1 for CP READ, then BEGIN or IPL CMS.
CMS has Immediate commands for this. They are handled at once, even while a program is running, and none of them prints a response.
Type the command and press Enter
While the program runs (status RUNNING), type one of these on the command line and press Enter. On a 3270 display Enter is the attention signal to the virtual machine, which is what lets CMS read the command.
HX(halt execution) stops whatever CMS command or program is running, closes its open files and devices, and returns you to the CMS prompt (Ready;). It also clears FILEDEF and DLBL definitions, including permanent ones, and releases user storage. It takes effect at the program's next supervisor call or I/O interrupt, so it can take a moment.HI(halt interpretation) ends every running REXX or EXEC 2 program, but leaves the rest of the CMS environment as it is. Use it for a looping exec when you do not want to lose file definitions.HT(halt typing) only stops the screen output. The program keeps running.RTturns output back on; whatever was written in between is lost. HT is useful when a program fills the screen faster than you can read it, and you want it to finish.
HB halts a CMS batch job. TS, TE, SO, RO and HO control tracing.
After HX in a multitasking or POSIX program, such as PING, CMS stops at VM READ and treats any command you enter as BEGIN. You then see only Ready;.
If CMS does not react: PA1
PA1 sends the interrupt to CP, the z/VM control program, instead of to CMS. The virtual machine stops, and the status area shows CP READ. From there:
BEGIN(orb) lets the virtual machine continue where it stopped. Do this if you pressed PA1 by mistake.IPL CMSstarts CMS again. The program is gone, and anything it had not saved is lost.LOGOFFends the session. When typed at CP READ, it first tries to break the virtual machine out of a wait state.
PA1 is only the default break key. TERMINAL BRKKEY can change it to PA2, Clear or a PF key, or set it to NONE. In full-screen CMS, PA1 performs a windowing function instead, and the break key stays NONE after you turn full-screen CMS off until you set it again. CP QUERY TERMINAL shows the current setting. With no break key, you reach CP by typing #CP followed by a CP command, where # is the logical line end character.
On z/OS instead
TSO and ISPF use different keys for the same job. See Stop a looping TSO command or REXX exec (PA1, IRX0920I).
Related
- z/VM "MORE..." and "HOLDING" in the corner of the screen: what to press
- z/VM HCPLGA054E "Already logged on": reconnect with LOGON ... HERE
- Stop a looping TSO command or REXX exec (PA1, IRX0920I)
- PA and PF keys in practice
- Linux on z/VM: CP commands on the 3270 console, #CP or %CP, vmcp and DISCONNECT
Sources
- IBM z/VM 7.4: Immediate Commands
- IBM z/VM 7.4: HX (Halt Execution)
- IBM z/VM 7.4: HI (Halt Interpretation)
- IBM z/VM 7.4: HT (Halt Typing)
- IBM z/VM 7.4: RT (Resume Typing)
- IBM z/VM 7.4: Using the Attention Key
- IBM z/VM 7.4: TERMINAL BRKKEY
- IBM z/VM 7.4: BEGIN
- IBM z/VM 7.4: IPL (breaking out of wait states)
- IBM z/VM 7.4: LOGOFF
- IBM z/VM 7.5 CMS Primer (PDF): CP READ after PA1, HT and HX