Help using Base SAS procedures

Saving ODS as HTML

Reply
Contributor
Posts: 23

Saving ODS as HTML

Hello,

I'm trying to modify my procedure to save the PROC SHEWHART graphics to an HTML location.

The user guide on saving ODS graphics supports this method, however I get the attached error in the log.

http://support.sas.com/documentation/cdl/en/statug/63347/HTML/default/viewer.htm#/documentation/cdl/...

However, my underlying question is, Does SAS support a URL path? Rather than a direct path to a folder on my system, can SAS pump files to web server directly? http://myserver.com/SAS_Charts/test.htm

Thanks in advance,
John

Log Error;
60 ods html path = "C:\data\Test"
61 gpath = "C:\data\Test\Charts" (url="Charts/")
62 file = "test.htm";
NOTE: Writing HTML Body file: test.htm
ERROR: Physical file does not exist, /opt/sas92/Lev1/SASOrion/C:\data\Test/test.htm.
SAS Super FREQ
Posts: 8,743

Re: Saving ODS as HTML

Hi:
You should be able to save your output to an HTML file. The HTML "location" where you save your results is what you specify in the FILE= option of your ODS HTML invocation. Inside that HTML file, ODS builds an <IMG> tag that points to the location of the image that was built by ODS GRAPHICS. The URL= suboption and the GPATH= option instruct ODS how to build "internal" URLs.

The error message is very clear that there is no "C" drive on the server where SAS is running.
[pre]
ERROR: Physical file does not exist, /opt/sas92/Lev1/SASOrion/C:\data\Test/test.htm.
[/pre]

I wonder (due to the Lev1 folder in your error message) you are running this code using SAS or EG as part of the Business Intelligence Platform (or the SAS Platform for Business Analytics)??

It looks like your SAS session is running on a UNIX/Linux server and that your default directory is /opt/sas92/Lev1/SASOrion

Generally, when you are running programs on a SAS Server, such as the Workspace Server or the Stored Process server, you are NOT able to write to your local C drive, but must, instead, write to a location on the server; write to a webDAV location or return streaming results back to a client application.

How are you submitting your code??? From within EG?? Are you using the BI Platform??? What server are you using?? Do you have write access to the SAS_Charts directory on the "myserver.com" server???

Usually, web servers are machines on the network. So the web server "myserver.com" may have a machine name like \\kermit\
and the http://myserver.com location on the server might correspond to the path: \\kermit\public
and the URL http://myserver.com/SAS_Charts/test.htm might correspond to the physical machine location: \\kermit\public\SAS_Charts\test.htm -- so when you ask whether SAS supports a URL path, the answer is -- it depends -- generally speaking, the stored process server and workspace server only have visibility of their own locations or by UNC name or network name. The same is true of a web server machine -- if there is any visibility of a web server machine, it would be by UNC name or network name -- not directly by URL.

In this instance, you might want to work with Tech Support, because if you are working on the BI Platform, you may need to make different choices for you code for the code to reliably work as a stored process or to return results to a web browser on the Platform.

cynthia
Contributor
Posts: 23

Re: Saving ODS as HTML

Yes I am running this code using EG.I did try the UNC for myserver.com (which I have write access) and get a similar error;
ERROR: Physical file does not exist, /opt/sas92/Lev1/SASOrion/\\myserver.com/test.htm
I've even replaced the UNC name with the IP address. However given the error I believe it's not a routing issue. Given the UNIX path prefix (/opt/sas92/Lev1/SASOrion/) I'm guessing it's a config or set-up issue blocking me from accessing a location other than the UNIX path.

I will open a ticket with Tech Support to see if they can suggest a solution.

Thanks,
John
Ask a Question
Discussion stats
  • 2 replies
  • 390 views
  • 0 likes
  • 2 in conversation