BookmarkSubscribeRSS Feed
n01known
Fluorite | Level 6

Hello world! 😃

I have faced to next problem. Can I check access permission to the data to read and handle an error (if there is an error)?

For example: I need to know does user, that run SP, have permission to read the source and handle an error if there not.

I tried something like this:

data _null_;

     set DATA(obs=0);

     if _error_ ne 0 then do;

          put NOTE: "ERROR =" _error_;

          _error_ = 0;

     end;

run;

But it does not work =(

Any ideas? Thank you.

2 REPLIES 2
LinusH
Tourmaline | Level 20

Try to use the automatic macro variables sysrc and syscc.

Data never sleeps
n01known
Fluorite | Level 6

Thank you.

I tried to user SYSRC and SYSCC but there is no effect.

Or may be I use them incorrect. If you have an example, it would be a pleasant if you share it 😃

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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
  • 1459 views
  • 0 likes
  • 2 in conversation