# Base SAS Interview Questions

Recommended by 0 users

**Base SAS Interview Questions**

**Q. Explain SUBSTR function?**

SUBSTR Function is utilized for extracting a string of character value.

**Q. Explain what is SAS? What are the functions does it performs?**

SAS implies Statistical Analysis System, which is an incorporated arrangement of software products.

• Writing reports and graphics

• Quality Improvement

• Data Warehousing

• Application Development

• Statistical analysis, econometrics and data mining

**Q. Explain TRANSLATE function?**

Characters which are mentioned in a string are replaced by the characters determined by us.

**Q. Explain what is the basic structure of SAS programing?**

The basic structure of SAS are

• Program Editor

• Log Window

• Explorer Window

**Q. What is DATA _NULL_?**

The DATA _NULL_ is mainly used to create macro variables. It can also be used to write output without creating a dataset. The idea of “null” here is that we have a data step that actually doesn’t create a data set.

**Q. What are the default statistics that PROC MEANS produce?**

PROC MEANS produce the “default” statistics of N, MIN, MAX, MEAN and STD DEV.

**Q. Difference between NODUP and NODUPKEY Options? **

The **NODUPKEY** option removes duplicate observations where value of a variable listed in BY statement is repeated while **NODUP** option removes duplicate observations where values in all the variables are repeated (identical observations).

**Q. Explain PROC SORT?**

PROC SORT sorts SAS data set by variables so that a new data set can be prepared for further use.

**Q. ****Explain what is Data Step?**

**Explain what is Data Step?**

The Data step creates an SAS dataset which carries the data along with a “data dictionary.” The data dictionary holds the information about the variables and their properties.

**Q. ****Mention what are the data types does SAS contain?**

**Mention what are the data types does SAS contain?**

The data types in SAS are Numeric and Character.

**Q. ****Mention the validation tools used in SAS?**

**Mention the validation tools used in SAS?**

For DataSet : Data set name/ debug Data set: Name/stmtchk

For Macros: Options: mprint mlogic symbolgen

**Q. Explain PROC UNIVARIATE?**

It is used for elementary numeric analysis and will examine how data is distributed.

**Q. Explain APPEND procedure?**

APPEND means adding at the end so in terms of SAS we can say adding one sas data set to another sas data set.

**Q. Where BMDP procedure is uesd?**

For analyzing data BMPD procedure is used.

**Q. ****Can PROC MEANS analyze ONLY the character variables****?**

**Can PROC MEANS analyze ONLY the character variables**

**?**

No, Proc Means requires at least one numeric variable.

**Q. What are the functions which are used for Character handling functions?**

UPCASE and LOWCASE are the functions which are used for character handling functions.

**Q. What do you mean by CALL PRXFREE Routine?**

CALL PRXFREE routine is used for Character String Matching and is used for allocation of free memory for perl regular expression.

**Q. Define Formats?**

Formats can be defined as Instruction used by SAS for writing data values.

**Q. What are the features of SAS system?**

It provides Ipv6 support, new true type fonts, extended time notations, restart mode, universal printing, checkpoint mode and ISO 8601 support.

**Q. ****Explain what does PROC print, and PROC contents are used for?**

**Explain what does PROC print, and PROC contents are used for?**

To display the contents of the SAS dataset PROC print is used and also to assure that the data were read into SAS correctly. While, PROC CONTENTS display information about an SAS dataset.

**Q. ****How to use arrays to recode all the numeric variables****?**

**How to use arrays to recode all the numeric variables**

**?**

**_numeric_**;

**dim(Q)**;

**Q. ****Explain what Proc glm does?**

**Explain what Proc glm does?**

Proc glm performs simple and multiple regression, analysis of variance (ANOVAL), analysis of covariance, multivariate analysis of variance and repeated measure analysis of variance.

**Q. Define STD function?**

Standard deviation will be returned for nonmissing statements.

**Q. How can SAS program be validated?**

By writing OPTIONS OBS=0 at the starting of the code and if execution of code is On PC SAS than log will be detected itself by highlighted colors. These are the two ways for validating an SAS program.

**Q. ****What function CATX syntax does?**

**What function CATX syntax does?**

CATX syntax concatenate character strings remove trailing and leading blanks and inserts separators.

**Q. ****How to cou****nt missing values for numeric variables?**

**How to cou**

**nt missing values for numeric variables?**

Use **PROC MEANS with NMISS** option.

**Q. ****What are SYMGET and SYMPUT? **

**What are SYMGET and SYMPUT?**

**SYMPUT** puts the value from a dataset into a macro variable where as

**SYMGET** gets the value from the macro variable to the dataset.

**Q. What is Debugging?**

Debugging is the technique for testing the program logic and this can be done with the help of debugger.

**Q. Define MAX() function?**

Max() function is used to return the largest value.

**Q. ****Mention what is SAS data set?**

**Mention what is SAS data set?**

A SAS data set is a file consisting of two parts.

- A descriptor portion
- A data portion

**Q. ****Mention what is factor analysis?**

**Mention what is factor analysis?**

Factor analysis is a common term used for a family of statistical techniques associated with the reduction of a set of observable variables in terms of a small number of latent factors. The main goal of factor analysis is data reduction and summarization.

**Q. ****How to count the number of intervals between two given SAS dates?**

**How to count the number of intervals between two given SAS dates?**

**NTCK**(interval,start-of-period,end-of-period) is an interval function that counts the number of intervals between two give SAS dates, Time and/or datetime.

**Q. Explain what is PDV?**

Program Data Vector is the area of memory where data sets are created through SAS system i.e. one at a time. When program is executed an input buffer is created which will read the data values and make them assign to their respective variables.

**Q. ****How to ****count unique values by a grouping variable****?**

**How to**

**count unique values by a grouping variable**

**?**

You can use **PROC SQL** with **COUNT(DISTINCT variable_name)** to determine the number of unique values for a column.

**Q. Explain what is the use of function Proc summary?**

Proc Summary is same as Proc Means i.e. it will give descriptive statistics but it will not give output as default, we have to give an option print then only it will give the output.

**Q. Describe any one SAS function?**

**RIM :** removes trailing blanks from a character expression

```
Str1 = ‘my’;
Str2 = ‘dog’;
Result = TRIM (Str1)(Str2);
Result = ‘mydog’
```

**Q. ****Mention 5 ways to do a “table lookup” in SAS?**

**Mention 5 ways to do a “table lookup” in SAS?**

5 ways to do a “table lookup” in SAS include,

- PROC SQL
- Match Merging
- Direct Access
- Format Tables
- Arrays

**Q. ****Mention how will you generate test data with no input data?**

**Mention how will you generate test data with no input data?**

You will generate test data with no input data using “put” statement and “Data Null”.

**Q. ****Mention the difference between SAS functions and procedures?**

**Mention the difference between SAS functions and procedures?**

The difference between SAS functions and procedures is that

- Procedures expect one variable value per observation
- Functions expect values to be supplied across an observation

**Q. ****Mention how to limit decimal places for the variable using PROC MEANS?**

**Mention how to limit decimal places for the variable using PROC MEANS?**

By using MAXDEC=option you can limit decimal places for the variable.

**Q. ****Mention what is RUN-Group processing?**

**Mention what is RUN-Group processing?**

RUN-Group processing allows submitting a PROC step using RUN statement without ending the procedure.

**Q. ****Mention what are the default statistics that PROC MEANS produce?**

**Mention what are the default statistics that PROC MEANS produce?**

The default statistics that PROC MEANS produce are,

- N
- MN
- MAX
- MEAN
- STD DEV

**Q. ****Mention what are the scrubbing procedures in SAS?**

**Mention what are the scrubbing procedures in SAS?**

The scrubbing procedures in SAS are Proc Sort with nodupkey option. It will eliminate the duplicate values.

## 0 Responses on Base SAS Interview Questions"