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

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 788 views
  • 3 likes
  • 3 in conversation