Blog

Base SAS Interview Questions

  • (4.0)
  •   |   8404 Ratings

Base SAS Interview Questions

Last Updated: May 7th, 2018

If you're looking for Base SAS Interview Questions for Experienced or Freshers, you are at right place. There are lot of opportunities from many reputed companies in the world. According to research Base SAS has a market share of about 17.8%. So, You still have opportunity to move ahead in your career in Base SAS Programming. Mindmajix offers Advanced Base SAS Interview Questions 2018 that helps you in cracking your interview & acquire dream career as Base SAS Programmer.

Base SAS Interview Questions And Answers

Q) Call Statement In SAS

Functions And CALLs Description
DIM No. of Array elements
HBOUND Array's Upper bound
LBOUND Array's Lower bound
BAND Function Logical bitwise AND operation
BLSHIFT Function Logical bitwise left shift operation
BNOT Function Logical bitwise NOT operation
BOR Function Logical bitwise OR operation

Q1) Could you help us know more about SUBSTR function?

It is a function that helps in extracting a string or even replaces the content of character value.

Q2) Define in detail about the TRANSLATE function?

Under this function there are few characters which are specified in a string. They are then replaced with the other characters which are usually specified.

Q3) What is exactly SAS?

SAS is the abbreviation of the software called Statistical Analytics System. It includes the best software suite for multivariate analyses, advanced analytics, data management, predictive analysis and business intelligence to name a few. It also offers a graphical point and click solution for the smooth interface. This way it is equally user friendly for the users who are non technical and thus make sure better advanced options are found through SAS language.

Q4) Do you know the features of SAS?

SAS is the best platform that you can opt for. Since it is loaded with many benefits, you can enjoy features such as:

Data Access & Management: A user can also use it as DBMS software.
Reporting & Graphics: It can help you in visualizing the analysis in the type of lists, summary and even the graphic reports
Business solution: It offers the business analysis which you can later use as a the business product for different companies to use
Visualization:  with this type of tool, it becomes possible to visualize the graphs that range from simple plots till the bar charts and even the complex classification panels.
Analytics: It is also considered to be the leading market leader in analytics for different business products and services.

Q5) What makes SAS stand out to be the best over other data analytics tools?

There are many alternatives for SAS but what makes it unique as compared to others is:

  • Ease to understand: The concepts included in SAS are extremely easy to learn. Besides, it offers the most convenient option for those who already are aware about the SQL. On the other hand, R comes with a steep learning cover which is considered to be a low level programming language
  • Data Handling Capacities: it is at par the most leading tool which also includes the R& Python. When it comes to handle the huge data, it is the best platform to choose
  • Graphical Capacities: it comes with functional graphical capacities and has a limited learning scope. It is possible to customize the plots
  • Better tool management: It helps in release the updates with regards to the controlled environment. This is the main reason why it is well tested. Whereas if you considered R&Python, it has open contribution and risk of errors in the current development are also high.

Q6) What is PROC SORT?

It is used for sorting the SAS data for which variable are set. This way, it becomes possible to set a new data for further usage.

Enhance your IT skills and proficiency by taking up the SAS Training.

Q7) What is PROC UNIVARIATE?

The purpose of using such type of detail is for analysis the elementary at numeric level. It will help you examine how well is the data actually distributed

Q8) What is APPEND procedure?

It is all about adding at the end so that in case of SAS, there can be one more SAS data which you can add and further more other data set can automatically be added.

Q9) What is BMDP procedure?

This type of process is more basically used for analysis the data and ensure that whatever is received is accurate and comes without any kind of single error.

Q10) Define Input and Put function?

There are two types of functions that are of prime importance which are:

  • Input function: It helps in characterizing to the numeric conversion which includes the input (Source, informat)
  • Output function: It incldeus the numeric to character conversion which icnldues input (source and format)

Since these two functions are quite important, it is advised to study well about the same. At times, many people do get confused about the functioning.

Q11) What is RUN-Group processing?

It is used for submitting the step of a PROC which is used more specifically in RUN statement. It ends without any kind of process.

Q12) Do you know the functions that are used for Character handling functions?

There are basically two functions which are used for Character handling functions namely UPCASE and LOWCASE

Q13) Do you have any idea about the assigned length which is given to the target variable by the scanning functioning?

The variable that is used for scanning functioning is 200

Q14) What is RUN-Group processing?

It is more specifically used for process and submitting the PROC step that is used with the RUN statement. It does not end the process at any point of time.

Q15) Explain in details about function of Stop statement in a SAS Program

The purpose of Stop statement is to stop the process of the current data on an immediate basis. It also allows resuming the statement of the process once there is an end of the current data step.

Q16) Explain the difference between using drop = data set option in set and data statement?

If you are not willing to process few of the variables and you don’t even wish them to appear in the new set of the data then you must use specify drop = data set option in that particular set of the statement

But if you want to process some of the variables and don’t wish them to be visible in the new data set then you can also mention drop = data set option in that particular set of the statement

Q17) What is BY-Group processing?

This type of term is used to make sure that the data which is process is grouped, indexed or even ordered based depending upon the variables.

Q18) Can you explain the process of CALENDAR?

The prime aim of CALENDAR is to make the data of the calendar on monthly basis be visible in the format of the SAS data set.

Q19) Could you help me know the right way to limit the variables written to output dataset in DATA STEP?

Generally, KEEP and DROP are used for limiting the variables in the particular dataset

Under the DROP section it becomes,
The DROP is the option which states that SAS comes under which variable if you want to actually drop. If you want to place it on the statement of the SET, there is SAS drop which falls down the specified valuable when the input data becomes valuable. But if you place the DROP option on the DATA statement, the SAS drop down the selective variables when it writes down the output set of the data.

Under the KEEP section it becomes,
Moving on to the next section that comes if KEEP. It allows you to understand the SAS is available which you would want to keep. If you want to place the option of KEEP with that of the SET statement, then SAS keeps the listed available while it reads out the data set stored at the input. However, if you put the KEEP option within the DATA statement, you can use the specified variables when it write-downs the output data set.

Q20) What is the right way to validate the SAS program?

The OPTIONS OBS=0 at the beginning of the code needs to be written but if you want to execute the same then there will be a log which gets detected by the colors that gets highlighted. 

Q21) What is the difference between reading data from an external file and reading data from an existing dataset?

The main difference is that while reading an existing data set with the SET statement, SAS retains the values of the variables from one observation to the next. Whereas when reading the data from an external file, only the observations are read. The variables will have to re-declared if they need to be used.

Q22) Could explain the difference between PROC MEANS and SUMMARY?

Under the PROC MEANS there is a subgroup statist which is created only when there is a BY statement that is being used and the input data is previously well sorted out with the help of BY variables.
Under the PROC SUMMARY, there is a statistics which gets produced automatically for all the subgroups. It gives all sort of information that runs altogether. It would get the best sorting of the data set which is then produced with the help of the variables that significantly defines every subgroup and runs the PROC MEANS. 
Under the PROC SUMMARY section, the information in the output does not get created. At such time, you will have to use the OUTPUT statement for creating a new DATA SET and then use PROC PRINT to make sure the computed statics is visible

Q23) Do you have any example in which SAS does not convert or fails to convert the character value to numeric one?

You can take the valuable value PayRate which starts with a dollar sign ($). When the SAS converts the PayRate automatically to the numeric value, the value gets converted. 
Furthermore, there is also the dollar sign which further blocks the process. The value then cannot get converted into the numeric one.
That is why it is always advised to include the PUT and INPUT functions in the programs when the conversion takes place.

Q24) Do you know any SAS functions?

Substr, Scan, Catx, trim, Index, find, tranwrd, and Sum.

Q25) Explain the work of tranwrd function?

The replacement or the removal if the occurrence of a pattern or the characters within the character string is done with the TRANWRD function

Q26) Do you know the data types present in SAS?

SAS comes with two types of data which is numeric and character. Other than this, dates are also the part of the characters even if there are some functions to work as per the dates.

Q27) Could you explain the working of the dates in SAS data?

The central to every data set is the data itself. In SAS, the data is available in form of tabular manner where there are some of the variables that occupy the column space and also the row space gets occupied with the observation section.
The numbers are treated by SAS as the numeric data while other things come under the character data. This is the main reason why SAS comes with two types. If you take an example, SAS date is the numerical value which is equivalent to the days from the 1st of January, 1960

Q28) Can you explain about CALL PRXFREE Routine?

It focuses on Character String Matching to allocate the free memory

Q29) Do you know what CALL PRXCHANGE routine is?

CALL PRXCHANGE routine helps to perform the pattern matching replacement

Q30) What is ANYDIGIT function?

The focus of such function is to search the character string and return it soon after it is found

Q31) Could you please explain or understand in detail about CALL MISSING routine?

When there is a numeric or the character value that is specified, it is will be assigned or categorized under the missing values. For this, the use of CALL MISSING routine is made. There is no hard and fast rule for using it. Once you start using it, you get the far better clear idea on the same.

Q32) What is SAS?

SAS - A Statistical Analysis System, that has an integrated suite of software solutions. It is a software suite for advanced analytics, multivariate analyses, business intelligence, data management and predictive analytics.

Q33) What is Base SAS?

Base SAS is a text-based, basic IDE with an older interface. Enterprise Guide (EG) is a more GUI-like IDE with wizards to assist with writing code for various processes. 

Q34) Explain the use of SUBSTR function?

SUBSTR Function is used for extracting a string or replacing contents of character value.

Q35) Define the function of Stop statement in a SAS Program?

Stop statement causes SAS to stop processing the current data step immediately and resume processing statement after the end of current data step.

Q36) How many data types are there in SAS? 

There are two SAS  data types. Character and Numeric. Apart from this, dates are also considered as characters although there are implicit functions to work upon dates.

Q37) Briefly explain Input and Put function?

Input function – Character to numeric conversion- Input(source,informat)

put function –  Numeric to character conversion- put(source,format)

Q38) Define RUN-Group processing?

RUN-Group processing is used to submit a PROC step using RUN statement without ending the procedure.

Q39) What are the functions which are used for Character handling functions?

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

Q40) What is the length assigned to the target variable by the scan function?

200

Q41) How do you specify the number of iterations and specific condition within a single do loop?

data work;
do i=1 to 20 until(Sum>=20000);
Year+1;
Sum+2000;
Sum+Sum*.10;
end;
run;

This iterative DO statement enables you to execute the DO loop until Sum is greater than or equal to 20000 or until the DO loop executes 10 times, whichever occurs first.

Q42) How can you limit the variables written to output dataset in DATA STEP?

Both DROP and KEEP can be used to  limit the variables in the dataset.

  • The DROP= option tells SAS which variables you want to drop. If you place the DROP= option on the SET statement, SAS drops the specified variables when it reads the input data set and if you place the DROP= option on the DATA statement, SAS drops the specified variables when it writes to the output data set.
  • The KEEP= option tells SAS which variables you want to keep. If you place the KEEP= option on the SET statement, SAS keeps the listed variables when it reads the input data set. On the other hand, if you place the KEEP= option on the DATA statement, SAS keeps the specified variables when it writes to the output data set.

Q43) Explain BOR function?

It is a bitwise logical operation and is used for returning bitwise logical OR between two statements.

Q44) What is the difference between do while and do until?

DO WHILE expression is evaluated at the top of the DO loop. If the expression is false the first time it is evaluated, then the DO loop never executes. Whereas DO UNTIL  executes at least once.

Q45) How to convert a numeric variable to a character variable?

You must create a differently-named variable using the PUT function.

The example below shows the benefits of the PUT function.

charvar=put(numvar, 7.) ; 

Q46) Explain COMPRESS data set option?

It is used for compressing the data into new output.

Q47) What are the features of Base SAS system?

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

Q48) 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.

Explore SAS Sample Resumes! Download & Edit, Get Noticed by Top Employers!Download Now!

Popular Courses in 2018

Get Updates on Tech posts, Interview & Certification questions and training schedules