SAS Interview Questions & Answers (Basics)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4
At a glance
Powered by AI
The key takeaways are that SAS is a statistical analysis software used for data management, analysis and reporting. It has different libraries to store datasets and views and the data and proc steps are used to create, modify and analyze data.

SAS libraries can be dependent or independent and include default libraries like SASuser, SASHelp as well as user defined temporary and permanent libraries.

A DATA step is used to create or modify data using input like raw data or SAS datasets while a PROC step analyzes input data and produces output like reports or updated datasets.

SAS Interview Questions & Answers

Tutorialkart.com will explore every SAS career opportunity updates like future scope of SAS, types of SAS
jobs, Skills required for SAS programming, SAS job profiles, SAS competitors, SAS Employers, Companies
using SAS Programming Language, Pay-scale in SAS programming.

Students who choose career is SAS programming must learn some Tips & Tricks for cracking SAS Interview.
In SAS Interview, SAS Interview questions will be logical, analytical and Tricky.

If you are searching for SAS Interview Questions and Answers for 2018, SAS Interview Questions for freshers,
SAS Interview Questions for experienced, TOP SAS Interview Questions,TOP 50 SAS Interview Questions,
TOP 50 SAS Interview Questions, TOP 30 SAS Interview Questions, SAS Interview FAQ’s for 2018, TCS SAS
Interview Questions, Clinical SAS interview questions you are at right place.

SAS Interview Questions & Answers (basics)

Q1. Full form for SAS?


SAS means “Statistical Analysis Software”.

Q2. What is SAS System?


SAS system is an integrated system of software products that enables user to perform Data entry, retrieval,
management, report writing and Graphics, Statistical and mathematical analysis, Business planning,
forecasting and decision making, Operations research ams project management, quality improvements and
application development.

Q3. What is SAS program?


A SAS program is a sequence of statements executed in order. Every SAS statement ends with a semicolon
and the statement can be in upper-or lowercase letters.

Q4. How to grant writing access in SAS Studio?


SAS studio or SAS University edition may not have write access to SAs user directory. Write access to
SASuser directory must be enable using the following code.

proc options
option=rsasuser;
run;

proc options option=rsasuser;


run;

Q5. How to redirect SAS user folder?


Use LIBNAME statement to redirect SAS user folder.

Q6. What are SAS libraries?


In SAS, files like SAS Datasets and SAS views are stored in a folders called SAS Libraries.

Q7. List different default SAS libraries?


SASuser, SASHelp, Webwork and Work.

Q8. What are the different SAS libraries?


SAS libraries can be divided into two types depending on Database, they are dependent library and
Independent library.

Q9. What are user defined SAS libraries?


User defined SAS libraries are the one created by User and they are two types Temporary and permanent
libraries.

Q10. What is a SAS statement?


SAS statement is a type of SAS language element (or) a string of SAS keywords, SAS names, special
characters and operations that instructs SAS to perform specific operations like ABORT, CALL, CONTINUE,
DELETE, DO, DECLARE etc.

Q11. What is a DATA step?


A Data step is that which creates or modifies data using input data types like raw data or a SAS data set.

Q12. What is a PROC step?


PROC means procedure, PROC step analyses input data like SAS data set and produces output such as
reports or an updated data set.

Q13. What are Global Statements in SAS?


Global statements are the one used anywhere in a SAS program and takes effect until it is changed, canceled
or SAS session ends.

Q14. Which SAS statement is used to read an external raw data file to a DATA
Step?
Infile statement.

Q15. What are special input delimiters ? Explain them ?


DLM and DSD are the two special input delimiters used in the Infile statement. DSD option treats two delimiters
in a row as MISSINGf value, it also ignores the delimiters enclosed in quotation marks.

Q16. Difference between Informats and Formats ?


SAS Informat is an instruction that SAS used to read data values into a variable. Example:- MMDDYYw. DATEw. TIMEw. ,
PERCENTw,
SAS format is a set of instructions to the SAS system about how to WRITE or DISPLAY a stores value (or) Format is an
instruction that SAS uses to write data values. Example:- WORDIATE18., weekdatew.

Q17. List any three SAS functions that you have used and explain briefly?
LENGTH : It returns the length of an argument not counting the trailing blanks.
SUBSTR : It extracts a substring from an argument starting at ‘position’ for ‘n’ characters (or) until end of no ‘n’.
TRIM : It removes trailing blanks from character expression.
SUN : Sum of non missing values.
INT : It returns the integer portion of the argument.

Q18. How do you use trailing @ and Double @@?


Trailing @ : It holds the value past the data step. It is used to hold the line of data until it reaches either the end of the data
step or an INPUT statement that does not end with the trailing.
Double Trailing @@ :- It holds the value till a input statement or end of the line and it is used when we have multiple
observations per line of raw data. Double Trailing @@ should be used at the end of the INPUT statement.

Q19. When will you use SELECT construct instead of IF statement?


When we have a long series of mutually exclusive conditions and the comparison is numeric, we use SELECT
construct rather than IF-THEN or IF-THEN-ELSE statement because CPU time is reduced.

Q20. Suppose we don’t want any output form a Data Step then how can we
prevent SAS from producing a set?
We can prevent SAS from producing a Set using DAT_Null_

Q21. How would you include comma (or) reuse code to be processed along with
your statement?
By using SAS Macros

Q22. How to delete duplicate observations?


To delete duplicate observations use noduprecs option in a Proc Sort.

Q23. What is PDV and it’s functions?


PDV means Program Data Vector and it contains two automatic variables _N_ and _ERROR_. PDV (Program
Data Vector) is a logical area in memory where SAS creates a dataset one observation at a time.
Q24. What are _N_ and _ERROR_ in SAS?
_N_ is a data counter variables used to indicate the number of times that SAS has looped through the data step.
_ERROR_ is a implicit variable created by SAS during data processing. It gives the total number of records SAS has
iterated in a dataset.

Q25. How SAS log messages “numeric values have been converted to
character”?
It implies that automatic conversion took place to make character function possible.

SAS Tutorial

⊩ SAS Tutorial

⊩ SAS Basics

⊩ SAS - Creating Libraries

⊩ SAS - Program basics

⊩ SAS - Environment

⊩ SAS - Keyboard Shortcuts

⊩ SAS - Sample SAS program

⊩ SAS - Data Step Overview

⊩ SAS - Datasets Overview

⊩ SAS - What is Informat

⊩ SAS - What is Format

⊩ SAS - INFILE statement

You might also like