Chapter 8: Managing Processing Using Proc SQL

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Moxleyv
M
Moxleyv
Community Contributor
Quizzes Created: 38 | Total Attempts: 21,479
Questions: 10 | Attempts: 135

SettingsSettingsSettings
Chapter 8: Managing Processing Using Proc SQL - Quiz

Practice for the SAS advance certification exam


Questions and Answers
  • 1. 

    PROC SQL options are specified in

    • A.

      The PROC SQL statement

    • B.

      An OPTIONS statement.

    • C.

      A SELECT statement.

    • D.

      The OPTIONS procedure.

    Correct Answer
    A. The PROC SQL statement
    Explanation
    PROC SQL options are specified in the PROC SQL statement. After you specify an option, it remains in effect until you change it or you re-invoke PROC SQL.

    Rate this question:

  • 2. 

    Which of the following options restricts the number of rows that PROC SQL takes as input from any single source?

    • A.

      OUTOBS=

    • B.

      INOBS=

    • C.

      OBS=

    • D.

      None of the above

    Correct Answer
    B. INOBS=
    Explanation
    The INOBS= option restricts the number of rows that PROC SQL takes as input from any single source. The INOBS= option is similar to the SAS system option OBS= and is useful for debugging queries on large tables. The OUTOBS= option restricts the number of rows that PROC SQL displays or writes to a table.

    Rate this question:

  • 3. 

    Which PROC SQL step creates the output shown below?

    • A.

      proc sql nonumber outobs=10; select * from sasuser.flightattendants where jobcode='FA1'; select * from sasuser.flightattendants where jobcode='FA2';

    • B.

      proc sql number; select * from sasuser.flightattendants where jobcode='FA1'; reset nonumber outobs=10; select * from sasuser.flightattendants where jobcode='FA2';

    • C.

      proc sql nonumber; select * from sasuser.flightattendants where jobcode='FA1'; reset number outobs=10; select * from sasuser.flightattendants where jobcode='FA2';

    • D.

      proc sql; select * from sasuser.flightattendants where jobcode='FA1'; reset outobs=10; select * from sasuser.flightattendants where jobcode='FA2';

    Correct Answer
    C. proc sql nonumber; select * from sasuser.flightattendants where jobcode='FA1'; reset number outobs=10; select * from sasuser.flightattendants where jobcode='FA2';
    Explanation
    After you specify an option, it remains in effect until you change it or you re-invoke PROC SQL. You can use the RESET statement to add, drop, or change PROC SQL options without re-invoking the SQL procedure. In the correct answer, the RESET statement adds the NUMBER option and the OUTOBS= option. The resulting output lists the first 10 rows in the table Sasuser.Flightattendants where the value of Jobcode equals FA2 and includes a column named Row.

    Rate this question:

  • 4. 

    Which of the following options does not affect the appearance of HTML, PDF, or RTF output?

    • A.

      NUMBER | NONUMBER

    • B.

      DOUBLE | NODOUBLE

    • C.

      FLOW | NOFLOW | FLOW=n | FLOW=n m

    • D.

      B and c

    Correct Answer
    D. B and c
    Explanation
    The DOUBLE | NODOUBLE option specifies whether PROC SQL output is double-spaced in listing output. The FLOW | NOFLOW | FLOW=n | FLOW=n m option controls the appearance of wide character columns in listing output. Neither option affects the appearance of HTML output.

    Rate this question:

  • 5. 

    Which of the following statements is true regarding the STIMER option in PROC SQL?

    • A.

      The STIMER option in PROC SQL writes timing information for each statement to the SAS log.

    • B.

      The STIMER option in PROC SQL writes only cumulative timing information for the entire procedure to the SAS log.

    • C.

      When using the STIMER option in PROC SQL, the SAS system option STIMER must also be in effect.

    • D.

      A and c

    Correct Answer
    D. A and c
    Explanation
    The STIMER | NOSTIMER option in PROC SQL specifies whether PROC SQL writes timing information for each statement to the SAS log, instead of as a cumulative value for the entire procedure. NOSTIMER is the default. In order to use the STIMER option in PROC SQL, the SAS system option STIMER (the default) must also be in effect. If you use the system option alone, you will receive timing information for the entire procedure, not on a statement-by-statement basis.

    Rate this question:

  • 6. 

    A Dictionary table contains

    • A.

      Information about SAS data libraries.

    • B.

      Information about SAS data sets.

    • C.

      Information about SAS macros.

    • D.

      All of the above

    Correct Answer
    D. All of the above
    Explanation
    A Dictionary table is a special, read-only SAS data view that contains information about SAS data libraries, SAS data sets, SAS macros, and external files that are in use or available in the current SAS session. A Dictionary table also contains the settings for SAS system options that are currently in effect.

    Rate this question:

  • 7. 

    Dictionary tables are

    • A.

      Created each time they are referenced in a SAS program.

    • B.

      Updated automatically.

    • C.

      Limited to read-only access.

    • D.

      All of the above

    Correct Answer
    D. All of the above
    Explanation
    Dictionary tables are created each time they are referenced in a SAS program, updated automatically, and limited to read-only access. Accessing a Dictionary table causes SAS to determine the current state of the SAS session and return the information that you want.

    Rate this question:

  • 8. 

    Dictionary tables can be accessed

    • A.

      By running a PROC SQL query against the table, using the Dictionary libref.

    • B.

      By referring to the PROC SQL view of the table that is stored in the Sashelp library.

    • C.

      By referring to the PROC SQL view of the table that is stored in the Sasuser library.

    • D.

      A and b

    Correct Answer
    D. A and b
    Explanation
    Dictionary tables can be accessed by running a PROC SQL query against the table, using the Dictionary libref. Though SAS librefs are usually limited to eight characters, Dictionary is an automatically assigned, reserved word. You can also access a Dictionary table by referring to the PROC SQL view of the table that is stored in the Sashelp library.

    Rate this question:

  • 9. 

    Which of the following PROC SQL steps displays information about the Dictionary table Dictionary.Titles?

    • A.

      proc sql; describe dictionary.titles;

    • B.

      proc sql; describe table dictionary.titles;

    • C.

      proc sql describe table dictionary.titles;

    • D.

      proc sql describe dictionary titles;

    Correct Answer
    B. proc sql; describe table dictionary.titles;
    Explanation
    To see how a Dictionary table is defined, submit a DESCRIBE TABLE statement. The DESCRIBE TABLE statement writes a CREATE TABLE statement to the SAS log for the table specified in the DESCRIBE TABLE statement.

    Rate this question:

  • 10. 

    Which of the following PROC SQL steps displays the name (Memname), modification date (Modate), number of variables (Nvar), and the number of observations (Nobs) for each table in the Sasuser library?

    • A.

      proc sql; select memname, modate, nvar, nobs from dictionary.tables where libname='SASUSER';

    • B.

      proc sql; select memname, modate, nvar, nobs from dictionary.tables where libname='Sasuser';

    • C.

      proc sql; select memname, modate, nvar, nobs from 'SASUSER' where table=dictionary.tables;

    • D.

      proc sql; select SASUSER from dictionary.tables where cols= 'memname, modate, nvar, nobs';

    Correct Answer
    A. proc sql; select memname, modate, nvar, nobs from dictionary.tables where libname='SASUSER';
    Explanation
    To display information about the files in a specific library, specify the column names in a SELECT statement and the Dictionary table name in the FROM clause. The library name in the WHERE clause must be specified in uppercase letters because that is how it is stored in SAS and it must be enclosed in quotation marks.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 21, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Mar 13, 2013
    Quiz Created by
    Moxleyv

Related Topics

Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.