BookmarkSubscribeRSS Feed
sesboue
Calcite | Level 5

Hello

We just upgrading our SAS server :

Version SAS : 9.04.01M7P08062020
Plate-forme SAS : Linux LIN X64 5.10.0-9-amd64

SAS Studio Version : 3.81 (Edition Basic)

 

When I try to run code which was working well befor the upgrade I have this error message:

ERROR: Unable to establish ODS Graphics context.

 

This is the first error message when I submit code and each time I try to use ODS (sgplot or other function)

 

I try to look over internet about this problem but nothing appears. 

 

Any ideas?

 

Thanks

3 REPLIES 3
JosvanderVelden
SAS Super FREQ
Was the .cfg file on the server changed/updated when you upgraded the software?
If yes, verify if you have "-SASUSER" specified correctly in the config-flie.
There has been a single report on .cfg having -USER in stead of -SASUSER. But no proof that this was caused by the upgrade.

If not can you start the server and run the code below and attach the log?
ods graphics on /
width=3.25in
outputfmt=gif
imagemap=on
imagename="MyBoxplot"
border=off;

ods html file="Boxplot-Body.html"
style=journal;

proc sgplot data=sashelp.heart;
title "Cholesterol Distribution by Weight Class";
hbox cholesterol / category=weight_status;
run;

ods html style=htmlblue;
ods graphics on / reset=all;

Best regards, Jos
sesboue
Calcite | Level 5

If you speak of the file ./SASFoundation/9.4/sasv9.cfg we have

-SASUSER ~/sasuser.v94

 

I ran the code you gave and the log prints

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
NOTE: les instructions ODS dans l'environnement SAS Studio risquent de désactiver certaines fonctionnalités de sortie.
73
74 ods graphics on /
75 width=3.25in
76 outputfmt=gif
77 imagemap=on
78 imagename="MyBoxplot"
79 border=off;
80
81 ods html file="Boxplot-Body.html"
82 style=journal;
NOTE: Writing HTML Body file: Boxplot-Body.html
ERROR: Insufficient authorization to access /export/sas/SASHome/studioconfig/Boxplot-Body.html.
ERROR: No body file. HTML output will not be created.
83
84 proc sgplot data=sashelp.heart;
85 title "Cholesterol Distribution by Weight Class";
86 hbox cholesterol / category=weight_status;
87 run;

NOTE: PROCEDURE SGPLOT a utilisé (Durée totale du traitement) :
real time 3.01 seconds
cpu time 0.20 seconds

WARNING: RTF destination does not support GIF images. Using the default static format.
NOTE: There were 5209 observations read from the data set SASHELP.HEART.

88
89 ods html style=htmlblue;
NOTE: Writing HTML Body file: sashtml3.htm
ERROR: Insufficient authorization to access /export/sas/SASHome/studioconfig/sashtml3.htm.
ERROR: No body file. HTML output will not be created.
90 ods graphics on / reset=all;
91
92 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
104
I have an image still. I try to modify your code about the insufficient authorisation
ods html file="/home/personnels/sesboue/tmp/Boxplot-Body.html" an the log says

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
NOTE: les instructions ODS dans l'environnement SAS Studio risquent de désactiver certaines fonctionnalités de sortie.
73
74 ods graphics on /
75 width=3.25in
76 outputfmt=gif
77 imagemap=on
78 imagename="MyBoxplot"
79 border=off;
80
81 ods html file="/home/personnels/sesboue/tmp/Boxplot-Body.html"
82 style=journal;
NOTE: Writing HTML Body file: /home/personnels/sesboue/tmp/Boxplot-Body.html
83
84 proc sgplot data=sashelp.heart;
85 title "Cholesterol Distribution by Weight Class";
86 hbox cholesterol / category=weight_status;
87 run;

NOTE: PROCEDURE SGPLOT a utilisé (Durée totale du traitement) :
real time 1.45 seconds
cpu time 0.22 seconds

WARNING: RTF destination does not support GIF images. Using the default static format.
WARNING: GPATH or PATH is not a writable directory. It will be ignored.
NOTE: There were 5209 observations read from the data set SASHELP.HEART.

88
89 ods html style=htmlblue;
90 ods graphics on / reset=all;
91
92 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
104
Nothing very revelant for me
 
The problem seems tricky and perhaps  it is not from the installation: I ran an other code directly after connecting to the server and all is OK. After, I ran the code where the error appears. If I try to rerun the first code then I have the same error now.

The code which cause the problem:
%let wd=/home/personnels/sesboue/DevoirAncien;

options user="&wd" nodate;

filename fileACS "&wd/AC_Survey_2009-2010.csv" ;

%let download_url = "https://sesboue.users.lmno.cnrs.fr/data/AC_Survey_2009-2010_SAAD.csv";

proc http url=&download_url
   method="get" out=fileACS;
run;

proc import datafile=fileACS
   dbms=csv
   out=acsurvey replace;
   delimiter=";";
run;

data acsurvey;
   set acsurvey;

employe="Non"; if empstat="Employed" then employe="Oui"; select; when (age <= 29) age_cat="[18-29]"; when (age >=30 and age <= 39) age_cat="[30-39]"; when (age >=40 and age <= 49) age_cat="[40-49]"; when (age >=50) age_cat="[50-65]"; otherwise; end; run; title "La table acsurvey";
proc contents data=acsurvey; run; proc means data=acsurvey; var _numeric_;
run; proc freq data=acsurvey; table _character_; run; title "La variable empstat"; title2 "Diagramme en barres verticales";
proc sgplot data=acsurvey; vbar empstat /datalabel; yaxis label="Effectifs"; run;
 
Thanks for the help
 
Andre
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: ...

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 3220 views
  • 2 likes
  • 3 in conversation