BookmarkSubscribeRSS Feed
Manikanta
Calcite | Level 5

Hi All ,

 

I just come across one issue while working on SYSERR.  As per my knowledge SYSERR capture numeric value (greater then 0) when error occurs in program . However for below code we can see error called file work.run.data does not exist . But still SYSERR value is 0 in log .

 

Can any one please tell me how to get below error in SYSERR. 

 

data one;

set two

run; 

 

ERROR : File WORK.RUN.DATA does not exist .

 

%put &syserr;

 

Thanks in advance .

2 REPLIES 2
Astounding
PROC Star

It's likely that the %PUT statement executed before the DATA step executed, because there is no RUN statement.  Try it this way and see if you get a nonzero value:

 

data one;

set two

run;

run;

 

%put &syserr;

Reeza
Super User

You missed a semi-colon in your SET statement, so don't have a RUN statement so the procedure doesn't complete.

 


@Manikanta wrote:

Hi All ,

 

I just come across one issue while working on SYSERR.  As per my knowledge SYSERR capture numeric value (greater then 0) when error occurs in program . However for below code we can see error called file work.run.data does not exist . But still SYSERR value is 0 in log .

 

Can any one please tell me how to get below error in SYSERR. 

 

data one;

set two

run; 

 

ERROR : File WORK.RUN.DATA does not exist .

 

%put &syserr;

 

Thanks in advance .


 

 

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
  • 1475 views
  • 1 like
  • 3 in conversation