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.
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:
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,
Note that I took out the extra FILE= option.
Then file files are created and the src=attribute shows the impact of URL=NONE:
And the output displays correctly when FRAME2.HTML is opened:
Also assumes that all 3 output HTML files are sent together and stored in the same folder, not different folders.
Hope this helps.
Cynthia
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:
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,
Note that I took out the extra FILE= option.
Then file files are created and the src=attribute shows the impact of URL=NONE:
And the output displays correctly when FRAME2.HTML is opened:
Also assumes that all 3 output HTML files are sent together and stored in the same folder, not different folders.
Hope this helps.
Cynthia
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.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.