The SAS Output Delivery System and reporting techniques

ODS HTML error

Accepted Solution Solved
Reply
Contributor
Posts: 28
Accepted Solution

ODS HTML error

Trying to save a gauge to a png file on a UNIX box and cannot get it working correclty.  Thanks for any help!

 

Code trying to run.

 

ods listing;
ods html
path='/sas/data/shared_data/Projects/company_metrics/safety/output/'
gpath='/sas/data/shared_data/Projects/company_metrics/safety/output/'
file='DART_GG.html'
;
ods graphics on / reset=index reset=all
imagefmt=png
imagemap=on
imagename="DART_GG"
border=off;

proc gkpi mode=raised;
dial actual=&actl_Dart
bounds=(&max_Dart &q3_Dart &q2_Dart &q1_Dart &min_Dart) /
label="DART Rate"
colors=(red,yellow,green,blue)
target=&trgt_Dart
format="comma15.2"
lfont=(f="Albany AMT" height=1.0cm)
afont=(f="Albany AMT" height=0.5cm)
bfont=(f="Albany AMT" height=0.4cm) ;
run;
ods html close;
ods graphics on / reset=all;

 

Error that I get.


ERROR: Physical file does not exist, /sas/work/SAS_work068A017D0006_wasascsprd2.nu.com/_BCD0082C07F11E5B49DD64A229B070B.PNG.
ERROR: Physical file does not exist, /sas/work/SAS_work068A017D0006_wasascsprd2.nu.com/_BD0BE70C07F11E5B49DD64A229B070B.PNG.


Accepted Solutions
Solution
‎01-22-2016 08:26 AM
Contributor
Posts: 28

Re: ODS HTML error

Figured out how to rename the png file, code below.  The png file can be renamed in the proc, in bold below.  Thanks for your help.

 

ods html
path="&download_from"
file="DART_GG.html"
gpath="&download_from"
;

proc gkpi mode=raised;
dial actual=&actl_Dart bounds=(&max_Dart &q3_Dart &q2_Dart &q1_Dart &min_Dart) /
name="DART_GG"
label="DART Rate"
colors=(red,yellow,green,blue)
target=&trgt_Dart
format="comma15.2"
lfont=(f="Albany AMT" height=1.0cm)
afont=(f="Albany AMT" height=0.5cm)
bfont=(f="Albany AMT" height=0.4cm)
;
run;quit;
ods html close;
ods graphics on / reset=all;

View solution in original post


All Replies
Grand Advisor
Posts: 10,239

Re: ODS HTML error

You may want BODY= instead of File=

 

Also GKPI is not an ODS graphics procedure so the file isn't created with the name or location you are intending. You have to specify DEVICE=JAVAIMG in a GOPTIONS statement as well.

 

The GKPI procedure also supports run groups so requires a QUIT; statement to end the procedure. So your procedure is still running when you attempt to close the destination and bad things ensue.

Contributor
Posts: 28

Re: ODS HTML error

Thanks for your help made the changes that you suggested.  Is there a way to rename the png file that gets produced.  I can rename the html file but not the png.

Grand Advisor
Posts: 9,593

Re: ODS HTML error

[ Edited ]

Make sure folder c:\temp\ has right to write .

 

 

 

ods listing  gpath='c:\temp\' ;
ods html
path='c:\temp\'
file='DART_GG.html'
;
ods graphics on / reset=index reset=all
imagefmt=png
imagemap=on
imagename="DART_GG"
border=off;

proc gkpi mode=raised;
dial actual=&actl_Dart
bounds=(&max_Dart &q3_Dart &q2_Dart &q1_Dart &min_Dart) /
label="DART Rate"
colors=(red,yellow,green,blue)
target=&trgt_Dart
format="comma15.2"
lfont=(f="Albany AMT" height=1.0cm)
afont=(f="Albany AMT" height=0.5cm)
bfont=(f="Albany AMT" height=0.4cm) ;
run;
ods html close;
ods graphics on / reset=all;

Contributor
Posts: 28

Re: ODS HTML error

Thanks for your help.  Made the changes that you suggested and I am not getting the error but I am stll not able to rename the png file that gets generated along with the html file.  Based on the previous post it seems that the ods graphics does not work with the gkpi image so I cannot figure out how to rename the png file.

 

ods html
path="&download_from"
file="DART_GG.html"
gpath="&download_from"
;
ods graphics on / reset=index
imagefmt=png
imagename="Test"
;
proc gkpi mode=raised;
dial actual=&actl_Dart
bounds=(&max_Dart &q3_Dart &q2_Dart &q1_Dart &min_Dart) /
label="DART Rate"
colors=(red,yellow,green,blue)
target=&trgt_Dart
format="comma15.2"
lfont=(f="Albany AMT" height=1.0cm)
afont=(f="Albany AMT" height=0.5cm)
bfont=(f="Albany AMT" height=0.4cm) ;
run;quit;
ods html close;
ods graphics on / reset=all;

Solution
‎01-22-2016 08:26 AM
Contributor
Posts: 28

Re: ODS HTML error

Figured out how to rename the png file, code below.  The png file can be renamed in the proc, in bold below.  Thanks for your help.

 

ods html
path="&download_from"
file="DART_GG.html"
gpath="&download_from"
;

proc gkpi mode=raised;
dial actual=&actl_Dart bounds=(&max_Dart &q3_Dart &q2_Dart &q1_Dart &min_Dart) /
name="DART_GG"
label="DART Rate"
colors=(red,yellow,green,blue)
target=&trgt_Dart
format="comma15.2"
lfont=(f="Albany AMT" height=1.0cm)
afont=(f="Albany AMT" height=0.5cm)
bfont=(f="Albany AMT" height=0.4cm)
;
run;quit;
ods html close;
ods graphics on / reset=all;

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 5 replies
  • 589 views
  • 2 likes
  • 3 in conversation