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-white.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.

 

Early bird rate extended! Save $200 when you sign up by March 31.

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