Hi,
Couldn't find the difference between ERRORABEND , ENDSAS ,ABORT.
What i understand is ,all terminate the SAS session if encounter error. But what is the difference and when to use which statement.
Thanks
ERRORABEND is a SAS System option, causing the system to immediately exit when an error is encountered (default is to continue with obs=0)
ENDSAS and ABEND are statements; ENDSAS simply terminates the SAS job or session gracefully, while ABORT also gives you control over the exit code handed back to the operating system.
ABORT terminates the current step, sets obs=0 and lets the SAS session/job continue (default behaviour for ERRORs)
ABORT ABEND terminates the step and terminates the SAS session/job immediately.
ERRORABEND is a SAS System option, causing the system to immediately exit when an error is encountered (default is to continue with obs=0)
ENDSAS and ABEND are statements; ENDSAS simply terminates the SAS job or session gracefully, while ABORT also gives you control over the exit code handed back to the operating system.
ABORT terminates the current step, sets obs=0 and lets the SAS session/job continue (default behaviour for ERRORs)
ABORT ABEND terminates the step and terminates the SAS session/job immediately.
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 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: