BookmarkSubscribeRSS Feed
Yennie
Calcite | Level 5
Hi all,

I had been generating and running my web pages and graphs locally for the past few months. so now this project is going live and I need to know how do I get SAS to force the ods html pages and graphs to be output to a remote directory in our company server so that everyone in the company will be able to view these webpages?

Hoping someone can help me on this one!!

cheers. yennie
4 REPLIES 4
GraphGuy
Meteorite | Level 14
The 'best' answer for you will be dependent on what code you're currently using, and what kind of output you're creating.

But an example of _one_ way to control the output location, when using "ods html" and device=png (or gif, etc) is included below. I assign a "filename odsout", and then I use that in the "path=" of my ods html statement (in my case, U: is mapped to a drive on the netapp file server \\sashq\root\u\realliso\ on the network, and the public_html directory is served by a web server)...

-----

%let name=foo;
filename odsout 'u:\public_html\';

GOPTIONS DEVICE=png;
ODS LISTING CLOSE;
ODS HTML path=odsout body="&name..htm" style=minimal;

proc gplot data=sashelp.class;
plot height*age /
des="" name="&name" ;
run;

quit;
ODS HTML CLOSE;
ODS LISTING;
Yennie
Calcite | Level 5
Hi Robert,

Thank you for your reply. This is a quick example of my code which I was using initially...

The above suggestion is great however i think it only allow me to output the gif. I can't see html pages .... =/

ODS HTML File = "/data/webserver/yennie";

Proc Summary Data = ABC Nway Missing;
Class month;
Var transif ;
Output out = ABC_smry (Drop = _Type_ _Freq_ ) Sum=;
Run;

%LET _EGCHARTWIDTH=0;
%LET _EGCHARTHEIGHT=0;
GOPTIONS xpixels=&_EGCHARTWIDTH ypixels=&_EGCHARTHEIGHT;
GOPTIONS COLORS = (CX0F3E93);
SYMBOL1 INTERPOL=SPLINES HEIGHT=10pt VALUE=NONE CV=RED LINE=1 WIDTH=3;
Axis1 STYLE=1 WIDTH=1 MINOR=NONE LABEL=( FONT='Arial /b' HEIGHT=13pt ANGLE=90 "Inforce Risks");
Axis3 STYLE=1 WIDTH=1 MINOR=NONE LABEL=( FONT='Arial /b' HEIGHT=13pt ANGLE=90 "Month");
TITLE;
TITLE1 " Portfolio ";
FOOTNOTE;

PROC GPLOT DATA = ABC_smry NOCACHE ;
PLOT transif * month /
GRID VAXIS=AXIS1
HAXIS=AXIS1 FRAME;
RUN;QUIT;

TITLE; FOOTNOTE;
GOPTIONS RESET=ALL;
ODS HTML Close;
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Start here for SAS/Graph output destination (both the HTML documents and the image files):

http://support.sas.com/documentation/cdl/en/grstatproc/61948/HTML/default/a003106589.htm

Scott Barry
SBBWorks, Inc.
GraphGuy
Meteorite | Level 14
Yennie - when I run the code I provided, it produces both a png file and an htm file, such as ...

login003> ls -lt foo*
-rwxr-xr-x 1 realliso isd 3172 Mar 24 08:11 foo.htm
-rwxr-xr-x 1 realliso isd 7569 Mar 24 08:11 foo.png

Try running the code from Windows SAS, as-is (with no changes), from a fresh SAS session. Oh, and not from EG. ... and I bet it will produce both files for you 🙂

With that as your starting place, then try adding your own SAS/Graph proc, and make sure it still produces both files. And then try running it from EG, etc, etc. At each point, making sure it produces both files. Perhaps your SAS session has a setting that's overriding the code, or maybe something similar if you're running from EG.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 948 views
  • 0 likes
  • 3 in conversation