Ch 16: Creating Output Flashcards

1
Q

Using ODS statements, how many types of output can you generate at once?

a. 1
b. 2
c. 3
d. as many as you want

A

Correct answer: d You can generate any number of output types as long as you open the ODS destination for each type of output you want to create.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

If ODS is set to its default settings, what types of output are created by the following code?

ods html file=’c:\myhtml.htm’;

ods pdf file=’c:\mypdf.pdf’;

a. HTML and PDF
b. PDF only
c. HTML, PDF, and EXCEL
d. No output is created because ODS is closed by default.

A

Correct answer: a HTML output is created by default in the SAS windowing environment for the Windows operating environment and UNIX, so these statements create HTML and PDF output.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the purpose of closing the HTML destination in the following code?

ods HTML close;

ods pdf … ;

a. It conserves system resources.
b. It simplifies your program.
c. It makes your program compatible with other hardware platforms.
d. It makes your program compatible with previous versions of SAS.

A

Correct answer: a By default, in the SAS windowing environment for the Windows operating environment and UNIX, SAS programs produce HTML output. If you want only RTF output, it is a good idea to close the HTML destination before creating RTF output, as an open destination uses system resources.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

When the following code runs, what does the file D:\Output\body.html contain?

ods html body=’d:\output\body.html’;

proc print data=work.alpha;

run;

proc print data=work.beta;

run;

ods html close;

a. The PROC PRINT output for Work.Alpha.
b. The PROC PRINT output for Work.Beta.
c. The PROC PRINT output for both Work.Alpha and Work.Beta.
d. Nothing. No output is written to D:\Output\body.html.

A

Correct answer: c When multiple procedures are run while HTML output is open, procedure output is appended to the same body file.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

When the following code runs, what file is loaded by the links in D:\Output\contents.html?

ods html body=’d:\output\body.html’ contents=’d:\output\contents.html’ frame=’d:\output\frame.html’;

a. D:\Output\body.html
b. D:\Output\contents.html
c. D:\Output\frame.html
d. There are no links from the file D:\Output\contents.html.

A

Correct answer: a The CONTENTS= option creates a table of contents containing links to the body file, D:\Output\body.html.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

The table of contents that was created by the CONTENTS= option contains a numbered heading for which of the following?

a. each procedure
b. each procedure that creates output
c. each procedure and DATA step
d. each HTML file created by your program

A

Correct answer: b The table of contents contains a numbered heading for each procedure that creates output.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

When the following code runs, what will the file D:\Output\frame.html display?

ods html body=’d:\output\body.html’ contents=’d:\output\contents.html’ frame=’d:\output\frame.html’;

a. The file D:\Output\contents.html .
b. The file D:\Output\frame.html.
c. The files D:\Output\contents.html and D:\Output\body.html.
d. It displays no other files.

A

Correct answer: c The FRAME= option creates an HTML file that integrates the table of contents and the body file.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the purpose of the following URL= suboptions?

ods html body=’d:\output\body.html’ (url=’body.html’) contents=’d:\output\contents.html’ (url=’contents.html’) frame=’d:\output\frame.html’;

a. To create absolute link addresses for loading the files from a server.
b. To create relative link addresses for loading the files from a server.
c. To allow HTML files to be loaded from a local drive.
d. To send HTML output to two locations.

A

Correct answer: b Specifying the URL= suboption in the file specification provides a URL that ODS uses in the links that it creates. Specifying a simple (one name) URL creates a relative link address to the file.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Which ODS HTML option was used in creating the following table?

a. format=MeadowPrinter
b. format=’MedowPrinter’
c. style=MeadowPrinter
d. style=’MeadowPrinter’

A

Correct answer: c You can change the appearance of HTML output by using the STYLE= option in the ODS HTML statement. The style name doe not need quotation marks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the purpose of the PATH= option?

ods html path=’d:\output’ (url=none) body=’body.html’ contents=’contents.html’ frame=’frame.html’;

a. It creates absolute link addresses for loading HTML files from a server.
b. It creates relative link addresses for loading HTML files from a server.
c. It allows HTML files to be loaded from a local drive.
d. It specifies the location of HTML file output.

A

Correct answer: d You use the PATH= option to specify the location for HTML files to be stored. When you use the PATH= option, you do not need to specify the full path name for the body, contents, or frame files.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly