Hi there,
I am working on this program that I have written. The program is to create a table of contents webpage with ods destination as html.
When I run this program, I do get a downloadable file with the names of the html webpages that I have created.
A couple of things do not run correctly from this program.
First, the frame webpage contains the body (output of print and means procedures) and the table of contents.
When I click on the table of contents meaning the links associated with the output of the procedure..it is giving me a blank page.
Second, when I open the contents webpage, the table of contents are displayed correctly however when I click one each link to see the output of each procedure..it is showing me outputs of both procedures. This is not correct, because I should see the output of print procedure only when I click the print procedure link in the table of contents webpage..same goes for the other link.
If anyone can help me in figuring out the solution..much appreciated. The name of the data set is called test_scores which is saved in a library named marchlib.
I am following program 19.2 (pg. 327) from the textbook named learning sas by example 2nd edition..
The program is below:
ods listing close;
*create table of contents with ods html statement and options;
ods html body='test_scores_Body.html'
contents = 'test_scores_Contents.html'
frame = 'test_scores_Frame.html'
path = "/home/u58138201/Practice/junelib_folder" (url=none);
*define proc print procedure;
title "Listing of Test_Scores";
title2 "Sample of HTML Outputs-all defaults";
proc print data=marchlib.test_scores;
id ID;
var Score1-Score3;
run;
*define proc means procedure;
title "Descriptive Statistics for Test_scores dataset";
proc means data=marchlib.test_scores n nmiss mean min max maxdec=2;
var Score1-Score3;
run;
*close html tag;
ods html close;
ods listing;
Thanks.
Hi:
I do not have the issue you report when I run a version of your program on my SAS OnDemand account. As you can see below, I am using a slightly modified version of your code to use SASHELP datasets to test the frame navigation file creation with ODS HTML:
After my code runs, I then need to download all 3 of the files to my local machine. To keep things easy for testing, I just downloaded all 3 files to my local C: drive Downloads folder, as shown below: I did not use your data or your file names.
Next I right-clicked on the FRAME.HTML file and clicked to open with Google Chrome.
All 3 files, BODY.HTML, TOC.HTML and FRAME.HTML must be in the same location folder when downloaded (and you can see them all in my Downloads folder). When Google Chrome opens, I see the normal FRAME displayed with the TOC.HTML file on the left panel and the BODY.HTML file displayed on the right side, as shown below:
If you are going to move all 3 files to a web server, then keep in mind that all the files will need to be stored in the same folder on the server.
If you continue to have issues with your frames and ODS HTML, you might need to open a track with SAS Technical Support.
Cynthia
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.