![base sas interview questions base sas interview questions](https://www.wisdomjobs.com/eunivdb/iquesimg/sas-bi-interview-questions-answers.png)
#BASE SAS INTERVIEW QUESTIONS SERIES#
When you have a long series of mutually exclusive conditions and the comparison is numeric, using a SELECT group is slightly more efficient than using IF-THEN or IF-THEN-ELSE statements because CPU time is reduced.
#BASE SAS INTERVIEW QUESTIONS CODE#
Under what circumstances would you code a SELECT construct instead of IF statements?.SAS will hold the line of data until it reaches either the end of the data step or an INPUT statement that does not end with the trailing.
![base sas interview questions base sas interview questions](https://carreersupport.com/wp-content/uploads/2021/11/coaching-interview-questions.jpg)
Trailing By using without specifying a column, it is as if you are telling SAS,” stay tuned for more information.
![base sas interview questions base sas interview questions](https://www.projectpractical.com/wp-content/uploads/2021/07/Clinical-SAS-Interview-Questions-and-Answers.jpg)
The line hold specifies like a stop sign telling SAS, “stop, hold that line of raw data”. What is the purpose of the trailing and the How would you use holds the value past the data holds the value till a input statement or end of the line.ĭouble trailing When you have multiple observations per line of raw data, we should use double trailing signs at the end of the INPUT statement.How would you code the criteria to restrict the output to be produced?.INT: Returns the integer portion of the argument. SUM: sum of non missing values.Ex: x=Sum(3,5,1) result: x=9.0 TRIM: removes trailing blanks from character expression.Įx: a=’my ‘ b=’cat’ X= TRIM(a)(b) RESULT: x=’mycat’. SUBSTR: SUBSTR(arg,position,n) extracts a substring from an argument starting at ‘position’ for ‘n’ characters or until end if no ‘n’. LENGTH: returns the length of an argument not counting the trailing blanks.(missing values have a length of Name and describe three SAS functions that you have used, if any?., PERCENTw,Formats: WORDIATE18., weekdatew. Format is to write the data.įormats can be same as informatsInformats: MMDDYYw. What is the difference between an informat and a format? Name three informats or formats.If reading a variable length file with fixed input, how would you prevent SAS from reading the next record if the last variable didn't have a value?īy using the option MISSOVER in the infile statement.If the input of some data lines are shorter than others then we use TRUNCOVER option in the infile statement.DSD option treats two delimiters in a row as MISSING value.ĭSD also ignores the delimiters enclosed in quotation marks. Comma separated values files or CSV files are a common type of file that can be used to read with the DSD option. They should be included in the infile statement. Are you familiar with special input delimiters? How are they used?ĭLM and DSD are the delimiters that I’ve used.Using Input statement with the column pointers like etc. How do you read in the variables that you need?.What SAS statements would you code to read an external raw data file to a DATA step?