Interviews are the one the most important part of getting job or placement. The last step to get your dream job is an interview, so you should be prepared well to crack the interviews. Interviews include many types of questions like questions based on situations, behaviour and technical knowledge. Other than the technical knowledge you can’t get them in a day or overnight as it requires proper practice. But technical knowledge or basics can be learnt in a day or two. Here we are going to enlist basic 25 SAS interview questions. SAS is one of the most important programming languages for the data science.The candidates who aspire to enter in the field of data science should know this language. Here i have listed questions that are basic concepts of SAS.
SAS Interview Questions
Below are some of the basic SAS programming interview questions for all the SAS learners.
1.What is the difference between do while and do until?
The do while command is used at the top of Do loop. If the do while expression is false at the first time then the do loop will never execute. Whereas the Do until command executes only at once.
2. How many data types are there in SAS?
The data types in the SAS are numeric and character.
3. How to limit decimal places for a variable using PROC MEANS?
By using given command we can limit decimal places for variable using PROC : Command: MAXDEC= option
4. What is the difference between PROC MEANS and PROC Summary?
The difference between the PROC MEANS and PROC Summary are that the PROC MEANS produces the report by default. And for the PROC Summary, you need to include the PRINT option in the PROC Summary statement.
5. How to specify variables to be processed by the FREQ procedure?
To specify variables to be processed by the FREQ procedure we need to use TABLES Statement.
6. The purpose of double trailing @@ in Input Statement ?
By using double trailing @@ in the input statement it tells SAS that rather advancing to a new record, hold current input record for execution of next statement.
7. How to include or exclude specific variables in a data set?
T exclude or include specific variables in data set use DROP, KEEP Statements and Data set Options.
8. What is the default statistics that PROC MEANS produce?
The default statistics that PROC Means produce are MIN, MAX, MEAN and STD DEV.
9.What is Program Data Vector (PDV)?
It is the area in the memory. PDV is created and followed by the creation of the input buffer.
10. What is DATA _NULL_?
DATA_NULL_ can be used to write the output without creating a dataset.
11.How to remove unique and duplicate values?
To remove unique and duplicate values use PROC SORT and NODUPKEY and NODUP options.
12. What is the difference between NODUP and NODUPKEY Options?
NODUPKEY removes the duplicate observations where the value of the variable that is listed in BY statement is repeated while the NODUP option removes the duplicate observations where values in all the variables are repeated.
13. How to sort in descending order?
To sort in descending order use DESCENDING keyword in PROC SORT code.
14. How to convert a numeric variable to a character variable?
To convert a numeric variable to a character variable you need to create a differently named variable using PUT function
15. How to convert a character variable to a numeric variable?
To convert character variable into a numeric variable you need to create differently named a variable using INPUT function.
16. What is Difference between SET and MERGE?
MERGE basically matches observations of data sets and SET concatenates data sets.
17. What are SYMGET and SYMPUT?
SYMPUT: It puts value from a dataset to a macro variable
SYMGET: It gets value from the macro variable to the dataset.
18. Which date function advances a date, time or DateTime value by a given interval?
INTNX function is used to advance a date, time, or DateTime value by a given interval, and returns a date, time, or DateTime value
19. what is the purpose would you use the RETAIN statement?
The purpose of using RETAIN Statement is that it tells SAS not to set the variables to missing when moving from current iteration of data step to next. Instead, the SAS retains all the values.
20. Difference between %EVAL and %SYSEVALF
%EVAL cannot perform the arithmetic calculations with those operands that have floating point values. And in this situation %SYSEVALF is used.
21. what Proc glm does?
Proc glm performs the simple as well as the multiple regressions, repeated measure analysis of the variance, analysis of variance, multivariate analysis of variance and analysis of covariance.
22. what is SAS informats?
SAS informats are used to read or to input the data from external files known as the Flat Files ASCII files.
23. What are the parameters of Scan function?
The parameter of Scan function are Scan(argument,n,delimiters)
24. Name few SAS functions?
The few SAS functions are Scan, Substr, trim, Catx, Index, tranwrd, find, Sum.
25. What is the function of the Tranwrd function?
The TRANWRD function is used to replace or remove all the occurrences of the pattern of characters within the character string.
So these are the SAS questions that should learn before going for the interviews. If you know the answers to the above questions then it is good but if you don’t know answers to these above questions then you should learn these questions before appearing for the interviews. Also, you should focus on other factors too that are listed above such as behaviour and situational questions. Also if you want to learn Interview questions for big data and interview questions for data science then you can learn it from here. If you have any query related to the post or anything else then you can leave a comment below, we will reply you at the earliest.