SAS Certification Review Session: Generating Reports And Test-Taking .

Transcription

SAS Certification Review Session:Generating Reports and Test-Taking StrategiesC o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

SAS Global Certification Webinar SeriesSeptember 14, 2017February 15, 2018January 18, 2018TODAY: March 13, 2018https://www.sas.com/en ars.html2C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

SAS Certification Review Session:Generating Reports and Test-Taking StrategiesMichele EnsorSenior ManagerSAS EducationBecky GrayCertification Exam DeveloperSAS Global CertificationCopyright SAS Institute Inc. All rights reserved.

www.sas.com/certify SAS Certified Base Programmer for SAS 94C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

1. Generating Reports2. Test-Taking StrategiesC o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Base Programming Exam Content AreasThe intended candidate for the SAS Base Programming exam is someone withcurrent SAS programming experience in the following five content areas:1.Accessing Data2.3.Creating Data StructuresManaging Data4.5.Generating ReportsHandling ErrorsIn addition, candidates should be familiar with the enhancements and newfunctionality available in SAS 9.4.6C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Generating ReportsThe content area of Generating Reports includes the following topics: Generate list reports using the PRINT procedure.Generate summary reports and frequency tables using Base SAS procedures.Enhance reports through the use of user-defined formats, titles, footnotes,and SAS System reporting options.Generate reports using ODS statements.7C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Using the PRINT ProcedureThe PRINT procedure is used to create a detail report ranging from a simplelisting to a highly customized report that groups the data and calculates totalsand subtotals.PROC PRINT DATA SAS-data-set NOOBS LABEL SPLIT 'character' ;BY DESCENDING variable(s);ID variable(s);SUM variable(s);VAR variable(s);RUN;By default, the PRINT procedure displays all observations, all variables, and anOBS column.8C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Question 1Which statement is true concerning the PRINT procedure?a. The BY statement sorts the observations in the input SAS data set.b. The ID statement eliminates the OBS column.c. The SUM statement produces grand totals plus produces subtotals if usedin conjunction with an ID statement.d. The VAR statement controls which variables are in the report but does notcontrol the order of the variables.9C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Question 1Which statement is true concerning the PRINT procedure?a. The BY statement sorts the observations in the input SAS data set.b. The ID statement eliminates the OBS column.c. The SUM statement produces grand totals plus produces subtotals if usedin conjunction with an ID statement.d. The VAR statement controls which variables are in the report but does notcontrol the order of the variables.10C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Creating Summary ReportsThe FREQ procedure is used to create a summary report including one-way ton-way frequency tables.PROC FREQ DATA SAS-data-set NLEVELS ORDER FREQ PAGE COMPRESS ;BY DESCENDING variable(s);TABLES requests / NOCUM NOPERCENT NOFREQ NOROW NOCOLLIST CROSSLIST FORMAT format NOPRINT;RUN; The FREQ procedure with no TABLES statement creates a frequency tablefor every variable. A one-way frequency is specified with a single variable and a two-wayfrequency is specified with an asterisk between two variables.11C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Question 2Given the following FREQ procedure:proc freq data sashelp.shoes nlevels;tables Region Product*Subsidiary;run;How many tables are created in the report?12C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Question 2Given the following FREQ procedure:proc freq data sashelp.shoes nlevels;tables Region Product*Subsidiary;run;How many tables are created in the report? 313C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Creating Summary ReportsThe MEANS procedure is used to create a summary report includingdescriptive statistics for variables across all observations and within groupsof observations.PROC MEANS DATA SAS-data-set statistic(s) MAXDEC number FW number NONOBS ;CLASS classification-variable(s);VAR analysis-variable(s);RUN; The MEANS procedure with no VAR statement analyzes all numericvariables. The data set does not have to be sorted by the classification variables.14C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Question 3Given the following SAS program:proc means data sashelp.shoes sum mean;var Sales Inventory / maxdec 0;class Region;run;What is the result of submitting the program?a. No errors are produced.b. The program produces an error due to an invalid option in the PROCstatement.c. The program produces an error due to an invalid option in the VARstatement.d. The program produces an error due to the order of the VAR and CLASS15statements.C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Question 3Given the following SAS program:proc means data sashelp.shoes sum mean;var Sales Inventory / maxdec 0;class Region;run;What is the result of submitting the program?a. No errors are produced.b. The program produces an error due to an invalid option in the PROCstatement.c. The program produces an error due to an invalid option in the VARstatement.d. The program produces an error due to the order of the VAR and CLASS16statements.C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Creating Summary ReportsThe UNIVARIATE procedure is used to create a summary report includingmoments, basic statistical measures, tests for locations, quantiles, andextreme observations.PROC UNIVARIATE DATA SAS-data-set NEXTROBS number ;ID variable(s);VAR analysis-variable(s);RUN; The UNIVARIATE procedure with no VAR statement analyzes all numericvariables.The ID statement and the NEXTROBS option impacts the extremeobservations section.17C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Question 4Given the following SAS program:proc univariate data sashelp.cars nextrobs 2;var MSRP;id Model;run;Which Extreme Observations output is created?a.b.18C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Question 4Given the following SAS program:proc univariate data sashelp.cars nextrobs 2;var MSRP;id Model;run;Which Extreme Observations output is created?a.b.19C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Enhancing ReportsGlobal statements can be used to enhance reports.OPTIONS DATE NODATE DTRESET NODTRESETNUMBER NONUMBER PAGENO nPS PAGESIZE n LS LINESIZE widthCENTER NOCENTER;TITLEn 'text';FOOTNOTEn 'text';Global statements are specified anywhere in your SAS program and remain ineffect until canceled, changed, or your SAS session ends.20C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Enhancing ReportsCommon statements are used with reporting procedures to enhance reports.The WHERE statement is used to select observations that meet a certaincondition.WHERE expression;The LABEL statement is used to assign descriptive labels to variables.LABEL variable 'label' . variable 'label' ;The FORMAT statement is used to assign formats to variable values.FORMAT variable(s) format . variable(s) format ;21C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Question 5title1 'SASHELP Library';title2 'CLASS Data Set';title3 'Internal Use Only';proc print data sashelp.class(obs 5); run;title2 'SHOES Data Set';proc print data sashelp.shoes(obs 5); run;What is the title for the second report?a.b.c.d.22C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Question 5title1 'SASHELP Library';title2 'CLASS Data Set';title3 'Internal Use Only';proc print data sashelp.class(obs 5); run;title2 'SHOES Data Set';proc print data sashelp.shoes(obs 5); run;What is the title for the second report?a.b.c.d.23C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Question 6Given the following:proc print data sashelp.class;where Sex 'M';where Age 15;run;What is the result of using two WHERE statements?a. The program produces an error and stops processing due to the twoWHERE statements.b. The first WHERE statement is used and the second WHERE statement isignored.c. The first WHERE statement is ignored and the second WHERE statement isused.d. The WHERE statements are combined with the logical operator AND24between the two statements.C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Question 6Given the following:proc print data sashelp.class;where Sex 'M';where Age 15;run;What is the result of using two WHERE statements?a. The program produces an error and stops processing due to the twoWHERE statements.b. The first WHERE statement is used and the second WHERE statement isignored.c. The first WHERE statement is ignored and the second WHERE statement isused.d. The WHERE statements are combined with the logical operator AND25between the two statements.C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Creating User-Defined FormatsThe FORMAT procedure is used to create user-defined formats.PROC FORMAT;VALUE format-name range1 'label'range2 'label' ;RUN;Format names can be up to 32 characters in SAS. Range(s) can be single values, ranges of values, or list of values. LOW, HIGH, and OTHER are valid keywords in ranges.The less than ( ) symbol is used to exclude values from ranges. Labels can be up to 32,767 characters in length. 26C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Creating User-Defined FormatsThe following shows additional PROC FORMAT syntax:PROC FORMAT LIBRARY libref .catalog FMTLIBCNTLIN input-control-SAS-data-set;VALUE format-name range1 'label'range2 [existing-format] ;SELECT format(s);RUN;The following are global options relating to formats:OPTIONS FMTERR NOFMTERRFMTSEARCH (item-1 item-n);27C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Question 7Given the following SAS program:proc format;value gender 'F' 'Female''M' 'Male'' ' 'Missing''other' 'Miscoded';run;What is the formatted value of a variable with a value of m?a. mb. Malec. Missingd. Miscoded28C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Question 7Given the following SAS program:proc format;value gender 'F' 'Female''M' 'Male'' ' 'Missing''other' 'Miscoded';run;What is the formatted value of a variable with a value of m?a. mb. Malec. Missingd. Miscoded29C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Question 8What is the default value of the FMTSEARCH option?a. FMTSEARCH (LIBRARY)b. FMTSEARCH (WORK)c. FMTSEARCH (LIBRARY WORK)d. FMTSEARCH (WORK LIBRARY)30C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Question 8What is the default value of the FMTSEARCH option?a. FMTSEARCH (LIBRARY)b. FMTSEARCH (WORK)c. FMTSEARCH (LIBRARY WORK)d. FMTSEARCH (WORK LIBRARY)31C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Using ODS StatementsODS statements can be used to send reports to a variety of ODS destinations.ODS destination FILE 'filename' STYLE style-template;SAS code to generate a report(s)ODS destination ALL CLOSE;The following are some of the common ODS 2K32C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .RTFEXCELXPEXCEL

Question 9Which ODS destination has incorrect syntax?a. ods html file 'myreport.htm';b. ods excelxp file 'myreport.xml';c. ods listing file 'myreport.txt';d. ods pdf file 'myreport.pdf';33C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Question 9Which ODS destination has incorrect syntax?a. ods html file 'myreport.htm';b. ods excelxp file 'myreport.xml';c. ods listing file 'myreport.txt';d. ods pdf file 'myreport.pdf';34C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Question 10Given the following SAS program:ods pdf file 'c:\temp\class.xyz';proc freq data sashelp.class;proc print data sashelp.class;ods all close;run;Which statement is true?a. A PDF file is created containing the output from the FREQ procedure.b. A PDF file is created containing the FREQ and PRINT procedures output.c. An error is produced due to the invalid extension on the ODS PDFstatement.d. An error is produced due to the RUN statement being located after the35last ODS statement.C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Question 10Given the following SAS program:ods pdf file 'c:\temp\class.xyz';proc freq data sashelp.class;proc print data sashelp.class;ods all close;run;Which statement is true?a. A PDF file is created containing the output from the FREQ procedure.b. A PDF file is created containing the FREQ and PRINT procedures output.c. An error is produced due to the invalid extension on the ODS PDFstatement.d. An error is produced due to the RUN statement being located after the36last ODS statement.C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

1. Generating Reports2. Test-Taking StrategiesC o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Base Programming Exam Preparationwww.sas.com/certify SAS Certified Base Programmer for SAS 9Training, Books, Sample Questions, Practice Exams, and Flash Cards38C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

SAS Product DocumentationFree SAS Product Documentation is inedoc/base/39C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Before the Exam Create a study plan for topics needing additional preparation. Determine a plan for how you will use the allotted exam time.Practice answering multiple choice SAS questions. Practice exam questions under timed conditions. Extend studying and reviewing sessions over days and weeks. Do not cram the night before.40C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Before the Exam Get a full night's sleep before the exam. Arrive early to the exam and take a moment to relax.Listen attentively to the instructions given by the staff. Read the exam directions carefully. 41C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

During the Exam Maintain a positive attitude. Do not be discouraged if you cannot answer a question.Read each question carefully and thoroughly. Formulate your answer before reading the options. Eliminate unlikely options first. Be sure to read all options before selecting one. Pace yourself so that you have enough time to answer everyquestion.42C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

During the Exam Skip questions that you cannot answer and return to thosequestions after completing the remainder of the exam. Return to difficult questions that you marked for review.Plan to finish early and have time for review. Do not be afraid to change an answer if you feel strongly about it. Leave no questions unanswered.43C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

STAY POSITIVE.WORK HARD.MAKE IT HAPPEN.44C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Q&APlease submit your questions in the Q&A windowC o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

BASE Programmer Certification Review Seriescommunities.sas.com Find a Community Learn SAS SAS CertificationPreparing for the Base Programming ExamSeptember 14, 2017Accessing Data and Creating Data StructuresJanuary 18, 2018Managing DataFebruary 15, 2018Generating Reports and Test-Taking StrategiesMarch 13, 201846C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

How to Reach m/certifyExam Registration pearsonvue.com/sas47C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

Thanks for attending this Certification Webinar!Michele.Ensor@sas.comC o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

@SASSoftwareSAS Software, SASUsersgroupSASSoftwareSAS, SAS Users Groupcommunities.sas.comblogs.sas.com/contentC o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. indicates USA registration. Other brand and product names are trademarks of their respective companies.

Thank You!C o p y r i g h t S AS In s t i tu t e In c. Al l r i g h ts r e s e r ve d .

The intended candidate for the SAS Base Programming exam is someone with current SAS programming experience in the following five content areas: 1. Accessing Data 2. Creating Data Structures 3. Managing Data 4. Generating Reports 5. Handling Errors In addition, candidates should be familiar with the enhancements and new functionality available .