The SAS Output Delivery System and reporting techniques

Results Viewer - SAS Output Frame is Blank

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 5
Accepted Solution

Results Viewer - SAS Output Frame is Blank

I'm following along with The Little SAS Book and I've reached section 5.5 Creating HTML Output. When I put the code that it says to use in and run it, the Results Viewer window pops up with a horizontal frame, similar to how it looks in the book, but no data appears... the page is blank. I've trying opening it in Internet Explorer, and Chrome as well, but it gives me the same thing and doesn't display the data. I Googled my issue for about an hour and got no where with it. Does anyone else have this problem? The code I'm using is below-

*5.5 Creating HTML Output

*Create the HTML files and remove procedure name;

ODS HTML;

ODS HTML STYLE = D3D BODY = 'C:\Users\amanda\Desktop\SAS Practice\Lengths8.html'

  FRAME = 'C:\Users\amanda\Desktop\SAS Practice\Lengths8.html'

  CONTENTS = 'C:\Users\amanda\Desktop\SAS Practice\Lengths8.html';

ODS NOPROCTITLE;

DATA marine;

  INFILE 'C:\Users\amanda\Desktop\SAS Practice\Lengths8.txt';

  INPUT Name $ Family $ Length @@;

RUN;

PROC MEANS DATA = marine MEAN MIN MAX;

  CLASS Family;

  TITLE 'Whales and Sharks';

RUN;

PROC PRINT DATA = marine;

RUN;

ODS HTML CLOSE;

I attached a picture to this post so you can see what I'm talking about, but there isn't too much to see... just a blank page.

Please help!

Alex

Attachment

Accepted Solutions
Solution
‎08-11-2014 07:41 PM
SAS Super FREQ
Posts: 8,643

Re: Results Viewer - SAS Output Frame is Blank

Hi:

  Generally speaking, you provide 3 different names when you use BODY= CONTENTS= and FRAME= ... you have the SAME name. So ODS has gotten confused. You asked for 3 separate files, but you gave all 3 files the same name. Try this (note that the c:\<...> is the place where you put in the physical path where you are writing the output files):
      

ODS HTML STYLE = D3D BODY = 'C:\<...>\Lengths8_body.html'
  FRAME = 'C:\<...>\Lengths8_frm.html'
  CONTENTS = 'C:\<...>\Lengths8_toc.html';

  
  proc print data=sashelp.cars(obs=3);
  run;

  proc freq data=sashelp.cars;
    tables type;
  run;

ods html close;

And, then, the file you must open is the FRAME= file because the FRAME= file is the "organizing file" that will hold and display the other 2 files (BODY= and CONTENTS=). By default, SAS will show you the BODY= file, but it will be faster if you go to your storage/output location and just double click on the FRAME= file from Windows Explorer.

Now, the cold shock of "real life usage" -- as cool as the HTML FRAME= stuff is, the chances are good that your company web master will NOT want you to put the files created by ODS on a company web site because 1) they are pure HTML 4.0 compliant HTML Frame navigation tags and 2) most web masters deliver "frame" content with different navigation methods than pure HTML FRAMEs...so, just take that example with a grain of salt.

  If you find you still have issues, you might need to incorporate PATH= (and possibly GPATH=) options into the mix. Shown below if the simple code above does not work. Just remember -- you will need to go find the FRAME= file and open it. The SAS Results Viewer does not show you the FRAME= file by default. It wants to show you the BODY= file by default.

    

ODS HTML STYLE = D3D PATH='C:\<...>\' (URL=NONE) GPATH='C:\<...>\' (URL=NONE)

  BODY = 'Lengths8_body.html'
  FRAME = 'Lengths8_frm.html'
  CONTENTS = 'Lengths8_toc.html';

  
  proc print data=sashelp.cars(obs=3);
  run;

  proc freq data=sashelp.cars;
    tables type;
  run;

ods html close;

cynthia

View solution in original post


All Replies
Grand Advisor
Posts: 9,713

Re: Results Viewer - SAS Output Frame is Blank

I don't have the source book you mention. Does the example actually have the exact same file for the body, contents and frame? That looks a little odd to me, most examples I've seen with those options have 3 separate files.

Solution
‎08-11-2014 07:41 PM
SAS Super FREQ
Posts: 8,643

Re: Results Viewer - SAS Output Frame is Blank

Hi:

  Generally speaking, you provide 3 different names when you use BODY= CONTENTS= and FRAME= ... you have the SAME name. So ODS has gotten confused. You asked for 3 separate files, but you gave all 3 files the same name. Try this (note that the c:\<...> is the place where you put in the physical path where you are writing the output files):
      

ODS HTML STYLE = D3D BODY = 'C:\<...>\Lengths8_body.html'
  FRAME = 'C:\<...>\Lengths8_frm.html'
  CONTENTS = 'C:\<...>\Lengths8_toc.html';

  
  proc print data=sashelp.cars(obs=3);
  run;

  proc freq data=sashelp.cars;
    tables type;
  run;

ods html close;

And, then, the file you must open is the FRAME= file because the FRAME= file is the "organizing file" that will hold and display the other 2 files (BODY= and CONTENTS=). By default, SAS will show you the BODY= file, but it will be faster if you go to your storage/output location and just double click on the FRAME= file from Windows Explorer.

Now, the cold shock of "real life usage" -- as cool as the HTML FRAME= stuff is, the chances are good that your company web master will NOT want you to put the files created by ODS on a company web site because 1) they are pure HTML 4.0 compliant HTML Frame navigation tags and 2) most web masters deliver "frame" content with different navigation methods than pure HTML FRAMEs...so, just take that example with a grain of salt.

  If you find you still have issues, you might need to incorporate PATH= (and possibly GPATH=) options into the mix. Shown below if the simple code above does not work. Just remember -- you will need to go find the FRAME= file and open it. The SAS Results Viewer does not show you the FRAME= file by default. It wants to show you the BODY= file by default.

    

ODS HTML STYLE = D3D PATH='C:\<...>\' (URL=NONE) GPATH='C:\<...>\' (URL=NONE)

  BODY = 'Lengths8_body.html'
  FRAME = 'Lengths8_frm.html'
  CONTENTS = 'Lengths8_toc.html';

  
  proc print data=sashelp.cars(obs=3);
  run;

  proc freq data=sashelp.cars;
    tables type;
  run;

ods html close;

cynthia

Occasional Contributor
Posts: 5

Re: Results Viewer - SAS Output Frame is Blank

That answer couldn't have been any better and I got it working thanks to your advice. Thank you for that, I really appreciate it. This is a great community.

Alex

Post a Question
Discussion Stats
  • 3 replies
  • 1191 views
  • 4 likes
  • 3 in conversation