Sie sind auf Seite 1von 6

Base Sas / Advance SAS Interview Questions by Keli Technologies

1) How many data types are there in SAS?


2) If a variable contains only numbers, can it be character data type? Also give example?
3) If a variable contains letters or special characters, can it be numeric data type? Not possible, it can
only be character data type.
4) How to read excel worksheet in SAS?
5) What version of SAS are you currently using?
6) Describe your familiarity with SAS Formats / Informats.
7) Data statement options at least any 3 options.
8) What system options are you familiar with?
9) For what purposes do you use DATA _NULL_?
10) Name at least five compile time statements?
11) State different ways of getting data into SAS?
12) Can you state some special input delimiters? DLM= or Delimiter =
13) Which gets applied first when using the keep= and rename= data set options on the same data set?
14) What option in PROC FORMAT allows you to create a format from an input control data set rather
than VALUE statement?
15) State different ways of combining sas datasets? Concatenation
16) What is Concatenation ? what is Interleaving ? Difference between Concatenation and Interleaving?
17) Types of Merge? How to merge two data sets?
18) What is the difference between One to One Merge and Match Merge? Give example also..
19) How can you combine two datasets based on the relative position of rows in each data set; that is,
the first observation in one data set is joined with the first observation in the other, and so on?
20) What would be the format of Revenue in resulting dataset?
21) If you have two datasets you want to combine them in the manner such that observations in each
BY group in each data set in the SET statement are read sequentially, in the order in which the data
sets and BY variables are listed then which method of combining datasets will work for this?
22) It is possible to use the MERGE statement without a BY statement? Explain?
23) I have a dataset concat having variable a b & c. How to rename a b to e & f?
24) What is difference between appending and concatenating? Or Append and set difference
25) What is interleaving?
26) How many datasets can be merged at a time using MERGE statement?
27) What does the difference between combining 2 datasets using multiple SET Statement and MERGE
statement with common key variable or without common key variable?
28) Set and Merge Difference
29) How do I remove duplicate observations from my data set?
30) How would you delete duplicate observations? NODUP
31) How would you delete observations with duplicate keys? NODUPKEY
32) How to display duplicated observations in a data using base sas? There are two ways to display
duplicate observations.
33) Rename= option and Rename as a Statement?

1
34) What is difference between proc means and proc summary?
35) What is use of output statement?
36) What is the purpose of trailing @ and @@?
37) What are Report Procedures? or What are Summary Procedures ? Can you name some report
procedures that you have used in your project and what kind of reports you have generated? or
Name few Report Procedures ?
38) What is Freq Procedure? How many types of Freq procedures are there?
39) What is the default report result of One Way Freq Procedure? Can you define few Statements and
Options in One Way Freq Procedure?
40) What is the purpose of Table, Weight, By in One Way / Two / N way Freq procedures?
41) What is Proc Freq's default behavior for handling missing values?
42) Describe CROSSLIST option in TABLES statement?
43) Proc Mean‟s procedure in detail?
44) What are the default statistics generated by Means Procedure?
45) By default on which variable data types the means procedure generates descriptive statistics?
46) How to classify the data in proc means and restrict on specific numeric variables to print descriptive
statistics?
47) How to override the default statistics in proc means? How to Store the results into output dataset?
48) What is the purpose of Display /Analysis / Flow / Spacing = option / Split = „spl char‟ / Headline /
Headskip / Dol,Dul,Ol, Ul / summarize / rbreak after/before / break after/before / column statement
/ define statement / Across in Proc Report ?
49) What is Means Procedure ? What is the default report of Means Proc?
50) What are the default statistics of Means Procedure?
51) How to overwrite the default statistics in Means Procedure with the User defined Statistics?
52) How to create output dataset from Means Procedure?
53) What is Maxdecd= value in proc means?
54) How does Means Procedure handle missing values?
55) What is Nobs / N / Missing options in proc means?
56) When creating an output dataset from Means Procedure it generates _Type_ / _Freq_ ? Can you
explain what does this mean?
57) Why do we use NWAY option in proc means?
58) What is the difference between Means / Summary / Univariate Procedures?
59) Is there any restriction on number of variables to be considered on Var Statement and Table
statement in Means Procedure?
60) When do we use Proc Tabulate ? Features of Tabulate Procedure ?
61) What is Class / Var / Table statement in Proc Tabulate?
62) Can numeric variables be specified on Class statement in Proc Tabulate?
63) Write the table definition with table structure in proc tabulate?
64) What is Report Procedure? Purpose? How do you enhance each and every variable in the output
result in Report Procedure?
65) Define the options on Proc Report that you know?
66) What is Order / Across / Group usage in Proc Report?

2
67) What is the difference between Order and Group variable in proc report? Order Statement
generates listing report with detailed rows and sorting in ascending order by default and
suppressing the repetitive printing of the values
68) In Proc Report give some ways by which you can define the variables to produce the summary
report?
69) Give some example where PROC REPORT‟s defaults are different than PROC PRINT‟s defaults?
70) Give some example where PROC REPORT‟s defaults are same as PROC PRINT‟s defaults?
71) Do you prefer PROC REPORT or PROC TABULATE? Why?
72) Purpose of ID / BY statement in proc Transpose? Pre-requisite for By statement in proc transpose?
73) How would you code the criteria to restrict the output to be produced? Use NoPrint Option
74) How to read raw data files?
75) Identify statements whose placement in the DATA step is critical. Data, Run statements
76) What is a method for assigning first.VAR and last.VAR to the BY group variable on unsorted data?
77) What is the Program Data Vector (PDV)? What are its functions?
78) How would you determine the number of missing or nonmissing values in computations?
79) What is _n_?
80) SCAN vs. SUBSTR function?
81) What system option determines whether the macro facility searches a specific catalog for a stored,
compiled macro?
82) Do you know about the SAS autoexec file? What is its significance?
83) I want to make a quick backup of a data sets along with any associated indexes What procedure can
I use?
84) What does the statement 'format _all_;' do?
85) Can a FORMAT, LABEL, DROP, KEEP, or LENGTH statements use array References ?
86) What is the one statement to set the criteria of data that can be coded in any step? Options
Statement
87) What is the effect of the OPTIONS statement ERRORS=1?
88) What's the difference between VAR A1 - A4 and VAR A1 -- A4?
89) What do the SAS log messages "numeric values have been converted to character" mean? What are
the implications?
90) Why is a STOP statement needed for the POINT= option on a SET statement? Because POINT= reads
only the specified observations, SAS cannot detect an end-of-file condition as it would if the file
were being read sequentially
91) How do you control the number of observations and/or variables read or written? FIRSTOBS and
OBS / DROP or KEEP
92) Approximately what date is represented by the SAS date value of 730?
93) Does SAS 'Translate' (compile) or does it 'Interpret'? Explain.
94) At Compile Time when a SAS dataset is read, what items are created? Input Buffer, PDV, Descriptor
Information
95) What does the RUN statement do?
96) What are some good SAS programming practices for processing very large data sets?

3
97) What is the different between functions and PROCs that calculate the same simple descriptive
statistics?
98) If you were told to create many records from one record, show how you would do this using arrays
and with PROC TRANSPOSE?
99) What is a method for assigning first.VAR and last.VAR to the BY groupvariable on unsorted data?
100) How do you debug and test your SAS programs?
101) What other SAS features do you use for error trapping and data validation? Error Trapping – Log
Window
102) How would you combine 3 or more tables with different structures?
103) Describe 5 ways to do a "table lookup" in SAS.
104) What are some problems you might encounter in processing missing values? In Data steps?
Arithmetic? Comparisons? Functions? Classifying data?
105) How would you create a data set with 1 observation and 30 variables from a data set with 30
observations and 1 variable?
106) What are _numeric_ and _character_ and what do they do?
107) How would you create multiple observations from a single observation? Using Double Trailing
@@
108) For what purpose would you use the RETAIN statement?
109) How could you generate test data with no input data? Using Data _Null_ and Put statement
110) What can you learn from the SAS log when debugging?
111) What is the purpose of _error_?
112) How does SAS handle missing values in: assignment statements, functions, a
113) How do you test for missing values? By using IF or WHERE conditions
114) How are numeric and character missing values represented internally? Characters as Blank and
Numeric as period (.)
115) Which date functions advances a date time or date/time value by a given interval? INTNX
function
116) In the flow of DATA step processing, what is the first action in a typical DATA Step?
117) What are SAS/ACCESS and SAS/CONNECT?
118) What is the difference between calculating the 'mean' using the mean function and PROC
MEANS?
119) I want to save hard drive space. How do I write a code to delete some or all temporary files once
I do not need them any more?
120) What is a problem with merging two data sets that have variables with the same name but
different data?
121) I am using a very huge data set in SAS for windows. How do I minimize space requirements?
122) Which data set is the controlling data set in the MERGE statement?
123) How do the IN= variables improve the capability of a MERGE?
124) Given an unsorted dataset, how to read the last observation to a new data
125) set?
126) Give some example where PROC REPORT’s defaults are same as PROC
127) Code the table's statement for a single level frequency?

4
128) What is Enterprise Guide? What is the use of it?
129) How would you code a merge that will keep only the observations that have matches from both
data sets? (IN = dataset option on MERGE statement)
130) What are input dataset and output dataset options?
131) Difference b/w sum function and using “+” operator?
132) How can u create zero observation dataset? ( OBS = 0)
133) What would be the result if all the arguments in SUM function are missing? A missing value
134) What is SAS GRAPH?
135) Why is SAS considered self-documenting?
136) What has been your most common programming mistake?
137) Name several ways to achieve efficiency in your program. Explain trade-offs. Efficiency and
performance strategies can be classified into 5different areas.•
138) What is the significance of the „OF‟ in X = SUM (OF a1-a4,a6, a9);
139) What do the INPUT and PUT Functions do?
140) Give an example where SAS fails to convert character value to numeric value automatically?
141) What would be the resulting numeric value (generated by automatic char to numeric
conversion) of a below mentioned character value when used
142) Which SAS statement does not perform automatic conversions in comparisons?
143) Name few SAS functions?
144) What date time functions come under numeric functions?
145) Difference between SCAN and SUBSTR function?
146) What are the parameters of Scan function? Scan (argument, n, delimiters)
147) What is the length assigned to the target variable by the scan function?
148) Difference between SAS Functions and Procedures?
149) What would be the result of following SAS function (given that 31 Dec, 2000 is Sunday) ?
150) How do you use the do loop if you don‟t know how many times should you execute the do
loop?
151) Have you ever linked SAS code? If so, describe the link and any required statements used to
either process the code or the step itself?
152) What statement you code to tell SAS that it is to write to an external file? What statement do
you code to write the record to the file?
153) Define different functions which can accomplish with proc sql
154) What is The SQL Procedure Pass-Through Facility?
155) Name four set operators?
156) What is the COALESCE function?
157) State some differences between the DATA Step and SQL?
158) What is the use of Proc SQL?
SAS MACRO Interview Questions
159) What do you code to create a macro?
160) Have you used macros? For what purpose you have used?
161) How would you invoke a macro?
162) How we can create macro variable?

5
163) Describe the ways in which you can create macro variables?
164) How can you create a macro variable with in data step?
165) How would you identify a macro variable?
166) How would you define the end of a macro?
167) If you use a SYMPUT in a DATA step, when and where can you use the macro variable?
168) What is the difference between %PUT and SYMBOLGEN?
169) Can you execute a macro within a macro? Describe.
170) Can you execute macro within another macro? If so, how would SAS know where the current
macro ended and the new one began?
171) How are parameters passed to a macro? OR Tell me more about the parameters in macro?
172) How would you code a macro statement to produce information on the SAS log?
173) Tell me about call symput?
174) When we can use call symputx and why?
175) If you use a SYMPUT in a DATA step, when and where can you use the macro variable?
176) Tell me about % include and % eval?
177) What is the maximum length of the macro variable?
178) Automatic variables for macro?
179) What system options would you use to help debug a macro?
180) What are SYMGET and SYMPUT?
181) What are the macros you have used in your programs?
182) What is auto call macro and how to create a auto call macro? What is the use of it? How to use
it in SAS with macros?
183) SAS Enables the user to call macros that have been stored as SAS programs.
184) Why and How to Use %PUT Statement:
185) Mention the macro functions?
186) What is the difference between %LOCAL and %GLOBAL?
187) How would you code a macro statement to produce information on the SAS log?
188) What does %put do?
189) Give example of macro quoting functions?
190) What is a sas catalog?

Das könnte Ihnen auch gefallen