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 .


 

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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