BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Brandon16
Obsidian | Level 7

Hi,

 

I can't seem to get a SAS dataset working with an ODS HTML BODY=

 

Any idea why this doesn't work please but does on tabulates?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

BODY= argument is expecting a filename not a data set name. 


ODS HTML is the output destination. To output to the destination you use PROC REPORT/PRINT/TABULATE. 


ODS HTML statement controls the file properties.

 

ods html file='/folders/myfolders/demo.html' style=meadow;

proc print data=sashelp.class;
run;

ods html close;

http://documentation.sas.com/?docsetId=odsug&docsetTarget=n0f5s1zezthhbrn1u0z71mh3wx64a.htm&docsetVe...

 

View solution in original post

2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

This "I can't seem to get a SAS dataset working with an ODS HTML BODY=" does not make any sense.  You generate html output the same way you generate any output, with the use of an output procedure like proc print, report, tabulate etc.  A SAS dataset is not an output procedure, unless you put in output routines like put.

Reeza
Super User

BODY= argument is expecting a filename not a data set name. 


ODS HTML is the output destination. To output to the destination you use PROC REPORT/PRINT/TABULATE. 


ODS HTML statement controls the file properties.

 

ods html file='/folders/myfolders/demo.html' style=meadow;

proc print data=sashelp.class;
run;

ods html close;

http://documentation.sas.com/?docsetId=odsug&docsetTarget=n0f5s1zezthhbrn1u0z71mh3wx64a.htm&docsetVe...

 

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
  • 2 replies
  • 762 views
  • 0 likes
  • 3 in conversation