What does this error code 2000 returned from &SYSERR mean?
2000 Semantic action problem
I have an user who keeps encountering this error on a Linux machine. When I run this user's code under my account on a Linux machine, it ran fine with return code 0. However, this user consistently keeps getting return code 2000. Does it have to something with the user's SAS profile and/or configuration?
So, can someone explain what is a "semantic action problem"?
Thank you.
Does the log have other errors? I would guess so and that would be significantly easier to debug.
Sadly, a return code of 0 doesn't mean something ran successfully either.
proc means data=sashelp.class;
var weight;
output out=want mean= / autotest
run;
%put &syserr.;
Does the log have other errors? I would guess so and that would be significantly easier to debug.
In the user's log, it shows the error message as:
ERROR:
.
Which was very cryptic. Then, I added &SYSERR in two places. The first one came back as 0 and the second one came back as 2000.
It's between ODS PDF FILE= ...., PROC REPORT, and ODS PDF CLOSE;
I couldn't replicate this on my own because I don't have an error since it works fine. I've attached a log for review.
Good reference info -- My search didn't come across this document earlier. I'll review this.
Since the error is right after this line:
ods pdf file="<deleted>/reports/sa_compare_x11_seats_oct.pdf" notoc;
Does the user have access to this location to create a file in that location?
Does the user have access to this location to create a file in that location?
Yes, we both do. The user actually owns the directory. The <deleted> part is reacted but it is a fully qualified path from root level down to the reports subdirectory.
Under my account, I ran the code myself and I didn't have any errors and the PDF was generated. Under this user's account, the user got this error with code 2000. If there was truly an error in the code, I would have gotten the same error as the user did but it did not happen.
That's why I'm at a loss to explain.
Thanks.
I'd probably say, pull it out of the macro/stored process, run each step individually so you can isolate where exactly the error is occurring and go from there.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.