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

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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