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

I am having errors with html formats. Here is the error message I see on my log:

"ERROR: A component of C:\Users\mehretu\AppData\Local\Temp\4\SAS Temporary
Files\_TD6816_SPAZIO_\H:\output\test.html is not a directory.
ERROR: No body file. HTML output will not be created.
"

What's confusing is I have zero problem with any other format...PDF,CSV,xlsx.

 

Any insight is appreciated.

HabAM
1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
Diamond | Level 26

Hi:
My guess is that you had something like this:
ODS HTML file="H:\output\test.html" ... ;

or
ODS HTML body="H:\output\test.html" ...;

Try changing it to:
ODS HTML path="H:\output" file="test.html" ... ;

or
ODS HTML path="H:\output" body="test.html" ...;

Notice how your WORK location folder is being pre-pended to your H: drive location. This is typically what happens when your default PATH is set to one thing and then the FILE= value is added to that default location.

Cynthia

View solution in original post

5 REPLIES 5
SASKiwi
PROC Star

Your HTML file test.html is being written to an invalid directory. Post your code so we can see what is happening more clearly.

Cynthia_sas
Diamond | Level 26

Hi:
My guess is that you had something like this:
ODS HTML file="H:\output\test.html" ... ;

or
ODS HTML body="H:\output\test.html" ...;

Try changing it to:
ODS HTML path="H:\output" file="test.html" ... ;

or
ODS HTML path="H:\output" body="test.html" ...;

Notice how your WORK location folder is being pre-pended to your H: drive location. This is typically what happens when your default PATH is set to one thing and then the FILE= value is added to that default location.

Cynthia

HabAM
Quartz | Level 8

Thank you Cynthia, the Path/body format worked. Is this a new change with the new release?

We just updated our SAS license and that is when I started having this error message.

HabAM
Cynthia_sas
Diamond | Level 26
Hi:
Yes, I believe that with the new release, the use of PATH= is now required for ODS HTML. Using the path location in FILE= or BODY= will generate a message such as you observed. Here's the note about it:
http://support.sas.com/kb/15/046.html

Cynthia
sara_t_saspubs
SAS Employee

The ODS HTML Statement documentation has information on the usage of path/body(file) under the PATH= option. Here's the link: ODS HTML Statement

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 5859 views
  • 2 likes
  • 4 in conversation