Premium

SAS Base Latest Interview Preparation (Q&A)



Question-: Can you specify WHERE= data set option while importing csv file using “IMPORT� statement?

Answer: No, when importing delimited, comma separated, or tab-delimited external files we can not use any SAS Data set options like ALTER=, PW=, READ=, WRITE= and WHERE= etc.



Question-: Can you import specific sheet of the excel file as SAS Data set, if yet then how?

Answer: To import the excel data we can use the IMPORT statement and we need to specify DBMS=XLSX. If we want to specify specific sheet from the xlsx then we need to use sheet= option for example as below.

Option validvarname=v7;
Proc import datafile=’c:\Users\HadoopExam\he_learner.xlsx’
Dbms=XLSX
Out = work.he_learner
Sheet=courses
Run;
Here validvarname option helps in converting spaces into underscores, while converting column name to variable name.



Question-: What is the use of SAS System option “OBS=�?

Answer: Using the SAS OBS= option you can specify how many observations to read. Suppose OBS=5 then it read 5 observations. If you want to read entire or all observations then you have to specify OBS=max.



Question-: Why does SAS XLSX engine does not support RANK proc?

Answer: The XLSX engine allows data to be read in sequence and not randomly. And RANK proc required data to be read randomly to order the data, hence while reading the data RANK proc or any other which need data to be read randomly are not supported.

Related Questions


Question-: Which procedure we can use to check the descriptor information?

Question-: New Dataset is created after compilation or execution?

Question-: As soon as execution phase completed two automatic variables _N_ and _ERROR_ also stored with the output Datasets?

Question-: The format to the variable is applied once the variables are added in the PDV during the execution phase?

Question-: Which all variables are not reset in the PDV in each iteration during the execution phase?

Question-: How FREQ procedure can be used to determine the errors in the Data?

Question-: How does procedure means helps in finding the error in the data?

Question-: What all is created during the compilation phased?