Top 30 SAS Interview Questions and Answers
We saw a comprehensive understanding of SAS. Today we will discuss Top SAS Interview Questions and answer. We will provide you with advanced SAS Interview Questions that will help to crack your upcoming interview as well as to acquire dream career as SAS developer.
We have big opportunities in SAS Programming. So, if you are looking for top & tricky SAS interview question for experienced or fresher, you are at right place.
Mostly Asked SAS Interview Questions and Answers
These are the most asked SAS Interview Question and Answers.
Q1. What are the new features included in the new version of SAS Programming Language?
The main advantage of version9 is a faster execution of applications and centralized access to data and support
There are lots of changes has been made in version 9 when we compared with the version8. The following are the few:
i. SAS version 9 supports Formats longer than 8 bytes & is not possible with version 8.
ii. Length for Numeric format allowed in version 9 is 32 whereas 8 in version 8.
iii. Length for Character names in version 9 is 31 whereas in version 8 is 32.
iv. Length for numeric informat in version 9 is 31, 8 in version 8.
v. Length for character names is 30, 32 in version 8.3 new informats are available in version 9 to convert various date, time and datetime forms of data into a SAS date or SAS time.
·ANYDTDTEW. – Converts to a SAS date value ·ANYDTTMEW. – Converts to a SAS time value. ·ANYDTDTMW. -Converts to a SAS datetime value.CALL SYMPUTX Macro statement is added in the version 9 which creates a macro variable at execution time in the data step by ·
Trimming trailing blanks · Automatically converting numeric value to character.
New ODS option (COLUMN OPTION) is included to create a multiple columns in the output.
2. What is the one statement to set the criteria of data that can be coded in any step?
OPTIONS Statement, Label statement, Keep / Drop statements.
Q3. In the flow of DATA step processing, what is the first action in a typical DATA Step?
When you submit a DATA step, SAS processes the DATA step and then creates a new SAS data set.( creation of input buffer and PDV)
Q4. How do you test for missing values?
Using Subset functions like IF then Else, Where and Select.
Q5. How could you generate test data with no input data?
Using Data Null and put statement.
Q6. How would you create multiple observations from a single observation?
Using double Trailing @@
Q7. What are some good SAS programming practices for processing very large datasets?
Sampling method using OBS option or subsetting, commenting the Lines, Use Data Null
Q8. Describe 5 ways to do a “table lookup” in SAS.
Match Merging, Direct Access, Format Tables, Arrays, PROC SQL
Q9. Explain what Proc glm does?
Proc glm performs simple and multiple regression, analysis of variance (ANOVA), analysis of covariance, multivariate analysis of variance and repeated measure analysis of variance.
Q10. What function CATX syntax does?
CATX syntax concatenates character strings remove trailing and leading blanks and inserts separators.
SAS Interview Questions and Answers For Freshers. Q- 1,2,4,6,8,10
SAS Interview Questions and Answers For Experienced. Q- 3,5,7,9
Q11. Explain what is the use of PROC gplot?
PROC gplot has more options and can create more colorful and fancier graphics.
Q12. Mention what is SAS data set?
A SAS data set is a file consisting of two parts.
- A descriptor portion
- A data portion
Q13. Mention the category in which SAS Informats are placed?
SAS informats are placed in three categories,
- Character Informats: $INFORMATw
- Numeric Informats: INFORMAT w.d
- Date/Time Informats: INFORMAT w.
Q14. What Is The Purpose Of _error_?
It has only two values, which are 1 for error and 0 for no error.
Q15. Mention what SAS features do you use to check errors and data validation
To check errors, use the Log and for data validation use things like Proc Freq, Proc Means or sometimes Proc print to see how data looks.
Q16. Mention the difference between CEIL and FLOOR functions in SAS?
The “floor” returns the greatest integer less than/equal to the argument. Whereas the “ceil” function returns the smallest integer greater than/equal to the argument.
Q17. Mention how to remove duplicates using PROC SQL?
To remove duplicates using PROC SQL use following step,
Proc SQL noprint; Create Table inter.merged1 as Select distinct * from inter.readin ; Quit;
Q18. Mention common programming errors committed in SAS ?
Common programming errors committed in SAS are,
- Missing semicolon
- Not checking log after submitting program
- Not using debugging techniques
- Not using Fsview option vigorously
Q19. Mention how to limit decimal places for the variable using PROC MEANS?
By using MAXDEC=option you can limit decimal places for the variable.
Q20. Mention why a STOP statement is needed for the POINT= option on a SET statement?
A STOP statement is used to control the continuous looping in SET statement.
SAS Interview Questions and Answers For Freshers. Q- 12,13,14,17,20
SAS Interview Questions and Answers For Experienced. Q- 11,15,16,18,19
Q21. Mention how to create a permanent SAS data set?
To create a permanent SAS data set, there are two steps necessary,
- Assign a library and engine.
- Create the data. Make sure to assign both a library (other than WORK) and data set name to make the data set permanent.
Q22. Mention what are the default statistics that PROC MEANS produce?
The default statistics that PROC MEANS produce are,
- STD DEV
Q23. Mention what is the command used to find missing values?
The command used to find missing values is
Q24. Mention what is the difference between Match Merge and One to One Merge?
A one-to-one merge is suitable if both data sets in the merge statement are sorted by id and each observation in one data set has a corresponding observation in the other data set. If the observations do not match, then match merging is suitable.
Q25. Mention what is the use of %include statement?
%INCLUDE statement reads an entire file into the current SAS program you are running and submits that file to the SAS System immediately
Q26. Under what circumstances would you code a select construct instead Of If Statements?
Select statement is used when you are using one condition to compare with several conditions like.
Data exam; Set exam; select (pass); when Physics gt 60; when math gt 100; when English eq 50; otherwise fail; run;
Q27. What Do The Sas Log Messages “numeric Values Have Been Converted To Character” Mean? What Are The Implications?
It implies that automatic conversion took place to make character functions possible.
Q28. Why Is Sas Considered Self-documenting?
SAS is considered self documenting because during the compilation time it creates and stores all the information about the data set like the time and date of the data set creation later No. of the variables later labels all that kind of info inside the dataset and you can look at that info using proc contents procedure.
Q29. If you were told to create many records from one record, show how you would do this using array and with Proc Transpose?
Declare array for number of variables in the record and then used Do loop Proc Transpose with VAR statement.
SAS Interview Questions and Answers For Freshers. Q- 22,25,28,29
SAS Interview Questions and Answers For Experienced. Q- 21,23,24,26,27
Stay updated with latest technology trends
Join DataFlair on Telegram!!
So these were some of the most important SAS Interview questions asked at a beginner level and intermediate level. In the next part of SAS Interview Questions, we will see some more tough and interesting questions. Furthermore, if you have any query feel free to ask in a comment section.