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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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