DATA Step, Macro, Functions and more

SYSERR CODE 2000

Reply
Contributor
Posts: 21

SYSERR CODE 2000

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.

Super User
Posts: 23,700

Re: SYSERR CODE 2000

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.;
Contributor
Posts: 21

Re: SYSERR CODE 2000

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.

Esteemed Advisor
Posts: 5,526

Re: SYSERR CODE 2000

Covered on page 12-16 of

 

http://support.sas.com/publishing/pubcat/chaps/57743.pdf

 

 

PG
Contributor
Posts: 21

Re: SYSERR CODE 2000

Good reference info -- My search didn't come across this document earlier.  I'll review this.

Super User
Posts: 23,700

Re: SYSERR CODE 2000

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?

 

 

Contributor
Posts: 21

Re: SYSERR CODE 2000

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.

Super User
Posts: 23,700

Re: SYSERR CODE 2000

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. 

Ask a Question
Discussion stats
  • 7 replies
  • 160 views
  • 0 likes
  • 3 in conversation