<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.vmssoftware.com/index.php?action=history&amp;feed=atom&amp;title=ON</id>
	<title>ON - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.vmssoftware.com/index.php?action=history&amp;feed=atom&amp;title=ON"/>
	<link rel="alternate" type="text/html" href="https://wiki.vmssoftware.com/index.php?title=ON&amp;action=history"/>
	<updated>2026-04-19T18:53:45Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.3</generator>
	<entry>
		<id>https://wiki.vmssoftware.com/index.php?title=ON&amp;diff=1617&amp;oldid=prev</id>
		<title>Jane.doe: Created page with &quot;&#039;&#039;&#039;ON&#039;&#039;&#039; is a command that performs a specified action when a command or program executed within a command procedure encounters an error condition or is interrupted by Ctrl/Y....&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.vmssoftware.com/index.php?title=ON&amp;diff=1617&amp;oldid=prev"/>
		<updated>2019-12-02T10:39:17Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;ON&amp;#039;&amp;#039;&amp;#039; is a command that performs a specified action when a command or program executed within a command procedure encounters an error condition or is interrupted by Ctrl/Y....&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;ON&amp;#039;&amp;#039;&amp;#039; is a command that performs a specified action when a command or program executed within a command procedure encounters an error condition or is interrupted by Ctrl/Y. The specified actions are performed only if the command interpreter is enabled for error checking or Ctrl/Y interrupts (the default conditions). Use the ON command only in a [[Command Procedure|command procedure]]. ON is a command executed inside of [[DCL]]; no [[Image|image]] is invoked.&lt;br /&gt;
&lt;br /&gt;
The default is ON ERROR THEN EXIT.&lt;br /&gt;
&lt;br /&gt;
=Syntax=&lt;br /&gt;
     ON  condition THEN [$] command&lt;br /&gt;
&lt;br /&gt;
==Conditions==&lt;br /&gt;
The following are valid conditions for the ON command:&lt;br /&gt;
* WARNING: return status of warning occurs ([[$SEVERITY]] equals 0).&lt;br /&gt;
* ERROR: return status of error occurs ([[$SEVERITY]] equals 2).&lt;br /&gt;
* SEVERE_ERROR: return status of error occurs ([[$SEVERITY]] equals 4).&lt;br /&gt;
* CONTROL_Y: Ctrl/Y character occurs on [[SYS$INPUT]].&lt;br /&gt;
&lt;br /&gt;
ON overrides the default error processing, which means that when error conditions milder than specified by the ON statement occur, the command procedure displays the message and continues.&lt;br /&gt;
&lt;br /&gt;
Once the ON command has been executed, the default action (ON ERROR THEN EXIT) is reinstated.&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
  $ ON SEVERE_ERROR THEN CONTINUE&lt;br /&gt;
A command procedure that contains this statement continues to execute normally when a warning or error occurs during execution. When a severe error occurs, the ON statement signals the procedure to execute the next statement anyway. Once the statement has been executed as a result of the severe error condition, the default action (ON ERROR THEN EXIT) is reinstated.&lt;br /&gt;
&lt;br /&gt;
[[Category:DCL Commands]]&lt;/div&gt;</summary>
		<author><name>Jane.doe</name></author>
	</entry>
</feed>