BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Jim_Ogilvie
Obsidian | Level 7

Hello,

 

I have a SAS programme which is made up of a series of %include statements (run in batch mode over Windows), like this:

 

%incude "path/programm1.sas";

%incude "path/programm2.sas";

%incude "path/programm3.sas";

 

If I have a macro in "programme2.sas" that executes the %ABORT with the ABEND option, will control pass back to the main programme and continue on to "programm3.sas", or will the batch session terminate?

 

Thanks

 

Jim

 

1 ACCEPTED SOLUTION

Accepted Solutions
s_lassen
Meteorite | Level 14

If you use %ABORT ABEND, the batch program will terminate immediately and report an error to the calling environment.

 

If you want the program to continue with the next %INCLUDE file instead, use %ABORT CANCEL FILE, which does exactly that.

View solution in original post

2 REPLIES 2
s_lassen
Meteorite | Level 14

If you use %ABORT ABEND, the batch program will terminate immediately and report an error to the calling environment.

 

If you want the program to continue with the next %INCLUDE file instead, use %ABORT CANCEL FILE, which does exactly that.

Ksharp
Super User
Or Try %RETURN

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 884 views
  • 3 likes
  • 3 in conversation