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

Hi,

 

I've run a whole set of analyses and output using ODS HTML to create a body, contents, and frame .html files. All of these properly display on my machine. However, when I send these three files over email, my recipients open up a blank frame.html and functioning body.html and contents.html file.

 

Here is the code I used to generate these three files:

 

 

ODS listing close;
ODS HTML 	path = "&outdir"
			body = 'body.html' (url='body.html')
			contents = 'contents.html' (url='contents.html')
			frame = 'frame.html' (url='frame.html')
			file = 'Analyses.html'
			newFile = NONE;

%include "&inpath\07-09-2019 Data Creation File.sas";
%include "&inpath\07-09-2019 Descriptive Tables.sas";
%include "&inpath\07-08-2019 Models.sas";
%include "&inpath\07-09-2019 Time Trends1.sas";
%include "&inpath\07-09-2019 Time Trends2.sas";

ods html close;

Is my error leading to the blank frame.html file in the code or am I just attaching too few files in my emails?

 

 

Thank you for help.

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
Diamond | Level 26

Hi: I would also recommend using (URL=NONE) after the PATH= option -- if you do this, then you don't need ANY of the other URL= options.

Also, you really should NOT have both BODY= and FILE=. with 2 of them, BODY.HTML will NOT be created, but Analyses.HTML will be created.

NEWFILE=NONE is the default. It's not hurting here, but you don't need it.

 

If I mimic your code, then the frame appears empty because the links inside the FRAME file are bad:

bad_frame.png

When you mail the 3 files (BODY or FILE, FRAME and CONTENTS), nobody will be able to open them using the FRAME file.

 

If you do this, on the other hand,

good_code.png

 

Note that I took out the extra FILE= option.

 

Then file files are created and the src=attribute shows the impact of URL=NONE:

good_frame_src.png

 

And the output displays correctly when FRAME2.HTML is opened:

good_frame.png

 

Also assumes that all 3 output HTML files are sent together and stored in the same folder, not different folders.

 

Hope this helps.

 

Cynthia

View solution in original post

2 REPLIES 2
Cynthia_sas
Diamond | Level 26

Hi: I would also recommend using (URL=NONE) after the PATH= option -- if you do this, then you don't need ANY of the other URL= options.

Also, you really should NOT have both BODY= and FILE=. with 2 of them, BODY.HTML will NOT be created, but Analyses.HTML will be created.

NEWFILE=NONE is the default. It's not hurting here, but you don't need it.

 

If I mimic your code, then the frame appears empty because the links inside the FRAME file are bad:

bad_frame.png

When you mail the 3 files (BODY or FILE, FRAME and CONTENTS), nobody will be able to open them using the FRAME file.

 

If you do this, on the other hand,

good_code.png

 

Note that I took out the extra FILE= option.

 

Then file files are created and the src=attribute shows the impact of URL=NONE:

good_frame_src.png

 

And the output displays correctly when FRAME2.HTML is opened:

good_frame.png

 

Also assumes that all 3 output HTML files are sent together and stored in the same folder, not different folders.

 

Hope this helps.

 

Cynthia

antonsvart
Fluorite | Level 6

Thank you for your help and taking the time to make these screenies!! Your solution worked and I learned precisely why and how the error happened.

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
  • 2 replies
  • 2025 views
  • 1 like
  • 2 in conversation