Advanced SAS Interview Questions And Answers

Blog Author


Published Date

17th September, 2018




  • Share this blog :

Explain what is SAS informats? SAS INFORMATS are used to read, or input data from external files known as Flat Files ASCII files, text files or sequential files). The informat will tell SAS on how to read data into SAS variables.

What is the difference between %LOCAL and %GLOBAL?

The %LOCAL that variable will be used only at the particular block only but in case of the %GLOBAL that variable will be used till the end of the SAS session

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.

What system options would you use to help debug a macro?

The SAS System offers users a number of useful system options to help debug macro issues and problems. The results associated with using macro options are automatically displayed on the SAS Log.

Specific options related to macro debugging appear in alphabetical order in the table below:

MEMRPT: Specifies that memory usage statistics be displayed on the SAS Log.


What are automatic variables for macro?

Every time we invoke SAS, the macro processor automatically creates certain macro var.

eg: &sysdate, &sysday.

What is call symput?

CALL SYMPUT takes a value from a data step and assigns it to a macro variable. I can then use this macro variable in later steps. To assign a value to a single macro variable,

We use CALL SYMPUT with this general form:

CALL SYMPUT (“macro-variable-name”, value);

How are parameters passed to a macro?

A macro variable defined in parentheses in a %MACRO statement is a macro parameter. Macro parameters allow you to pass information into a macro. Here is a simple example: %macro plot (yvar= ,xvar= ); proc plot; plot &yvar*&xvar; run; %mend plot; %plot(age,sex)

For what purposes have you used SAS macros?

If we want use a program step for executing to execute the same Proc step on multiple data sets. We can accomplish repetitive tasks quickly and efficiently. A macro program can be reused many times. Parameters passed to the macro program customize the results without having to change the code within the macro program. Macros in SAS make a small change in the program and have SAS echo that change thought that program.

How would you define the end of a macro?

The end of the macro is defined by %Mend Statement

How would you identify a macro variable?

with Ampersand (&) sign

What is the maximum length of the macro variable?

32 characters long.

Mention what are the data types does SAS contain?

The data types in SAS are Numeric and Character.

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.

Explain what is the use of PROC gplot?

PROC gplot has more options and can create more colorful and fancier graphics.

What are the data types does SAS contain?

The data types in SAS are Numeric and Character.

What is the difference between nodupkey and nodup options?

The difference between the NODUP and NODUPKEY is that, NODUP compares all the variables in our dataset while NODUPKEY compares just the BY variables

About Author


Author Bio

TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills .

Related Blogs

Write For Us