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

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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