BookmarkSubscribeRSS Feed
dblissett
Fluorite | Level 6

I am getting an error that I have never had before and I cannot find any information on it. 

 

"Error: Unable to establish ODS Graphics context"

 

Any help would be appreciated. 

 

 

4 REPLIES 4
Reeza
Super User
What code is generating this error?
dblissett
Fluorite | Level 6

The code is part of a very large loop. Here is one of the charts I make. 

 

ODS region y=0.01in Height= 3in Width=4in;
ODS GRAPHICS / Height=2.5in Width=3.5in ;
Proc SGPLOT data=REGI_Agg_PDF1_&C. SGANNO=REGI_SGANNO_RUU description="";
VbarPARM response=RUU Category=Year / Barwidth=0.75 FILLATTRS=(color=&colour);
Title "Sales Activity (&monthfull only)";
Xaxis Valuesrotate=vertical display=(nolabel) Valueattrs=(size=14 weight=BOLD);
yaxis display=none;
Run;

mtnbikerjoshua
Obsidian | Level 7

While researching this error, I found the following usage note that links the error to the USER system option. While I am still confused about the error behaviour I am seeing, this may be useful to you or others with the same error.

 

68936 - Using the SAS® SG procedures or ODS Graphics with the USER system option results in "Error: ...

norabelloUSDA
Calcite | Level 5

I am still having trouble with this and would appreciate additional help. 

 

The usage note https://support.sas.com/kb/68/936.html indicates

"To circumvent the issue, either modify your SAS code to use a technique that does not involve the USER system option, ..."

My reply: to the best of my understanding, I am not using any technique that involves the USER system option

 

"... or define a libref to have a name that is other than USER." 

My reply: I have already tried this to no avail using:

libname ABC "C:\Users\My.Name \OneDrive - USDA\Documents\ABC";

 

Reading other posts, I also tried 

options user=work;

but I still get the error message:


ods graphics on;
ERROR: Unable to establish ODS Graphics context.

 

Any advice on how to solve this? Thank you.

sas-innovate-white.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.

 

Early bird rate extended! Save $200 when you sign up by March 31.

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 3070 views
  • 1 like
  • 4 in conversation