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

 Does the ODS go before or after a libname?

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

@aweaver Please mark the question as Solved if you have your answer. Thanks!

View solution in original post

4 REPLIES 4
Shmuel
Garnet | Level 18

LIBNAME and ODS are declarative statements and independent.

You can use them in any order.

 

Usually I prefer to declare all libnames on start of my program

while ODS I preffer to to code starting the output session.

Cynthia_sas
SAS Super FREQ

Hi -- does the ODS what??? There are a variety of statements:

ODS PROCTITLE;
ODS RESULTS;
ODS OUTPUT;
ODS HTML file=...;
ODS HTML TEXT=...;
ODS RTF file=...;
ODS PDF file= ....;
etc, etc, etc.

Your question title speaks of using ODS HTML text. What code have you tried and how are the results you're getting either satisfactory or unsatisfactory.

Typically, your LIBNAME statement is placed at the TOP of your program when the program starts so that you immediately "plug" SAS into the location of the data. So, theoretically, something like this is a good pattern to follow.

cynthia

 

** model statements;

libname mystuff 'C:\class\SAS\ecprg193';

ods html file='c:\temp\myoutput.html' style=htmlblue;

ods html text='This is at the top of the table';

proc print data=mystuff.customer(obs=10);
run;

ods html close;
aweaver
Fluorite | Level 6
Thank you so much this helps a ton!
Reeza
Super User

@aweaver Please mark the question as Solved if you have your answer. Thanks!

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
  • 1089 views
  • 1 like
  • 4 in conversation