Language Reference


ABORT Statement

  • ABORT <error-message>;

The ABORT statement instructs PROC IML to stop executing statements. It also stops PROC IML from parsing any further statements, causing PROC IML to close its files and exit. See also the description of the STOP statement .

If you specify the optional error-message, the message is written to the SAS Log.

The ABORT statement is the run-time equivalent of the QUIT statement. That is, you can use the ABORT statement as part of logical statements such as IF-THEN/ELSE statements, as shown in the following statements:

proc iml;
do i = 1 to 10;
   if i>2 then
      abort;
   print i;
end;
quit;

Figure 25.32: Result of Aborting a Computation

i
1

i
2