ABORT Statement

ABORT ;

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.

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;  
/* SAS/IML statements after this line are never executed. */

Figure 23.31: Result of Aborting a Computation

i
1

i
2