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.