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
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
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
%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;
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.
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
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.