| Other SAS Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| If you?re not wanting any SAS output from a data step, how
would you code the data statement to prevent SAS from
producing a set? | | 1 |
| Code the MEANS to produce output to be used later. | | 1 |
| Name statements that are recognized at compile time only? | Accenture | 3 |
| Why is a STOP statement needed for the point=option on a
SET statement? | | 2 |
| libname deepak 'C:\SAS Files';
proc format;
invalue convert 'A+' = 100
'A' = 96
'A-' = 92
'B+' = 88
'B' = 84
'B-' = 80
'C+' = 76
'C' = 72
'F' = 65;
data deepak.grades;
input ID $3. Grade convert.;
*format Grade convert. ;
datalines;
001 A-
002 B+
003 F
004 C+
005 A
;
proc print data = deepak.grades;
run;
I get the following output
Obs ID Grade
1 001 .
2 002 .
3 003 .
4 004 .
5 005 .
I don’t understand why Grade shows up as a missing value.
Everything seems fine, including ID $3.
Now, in case I use ID : $3. Or use column input, I get the
desired output.
Kindly help
Deepak
| | 4 |
| Are you familiar with special input delimiters? How are they
used? | Accenture | 3 |
| What would the following datastep do?
Data _null_;
Set Dist end=eof;
Call Symput("xx"!!left(put(_n_,2.)),&dimension);
If EOF then
Call Symput('numrows',left(put(_n_,2.)));
Run;
dimension is a macro variable that is being passed here | | 1 |
| What is the one statement to set the criteria of data that
can be coded in any step? | | 3 |
| How would you delete observations with duplicate keys? | Accenture | 11 |
| There is a field containing a date. It needs to be
displayed in the format “ddmonyy” if it’s before
1975,”dd
mon ccyy” if it’s after 1985, and as ‘disco years’ if
its
between 1975 and 1985. How would you accomplish this in
data step code? Using only PROC FORMAT.
| CTS | 3 |
| If reading an external file to produce an external file,
what is the shortcut to write that record without coding
every single variable on the record? | Accenture | 3 |
| Can you excute a macro within a macro? Describe. | Genta | 2 |
| 1.What is the difference between _NULL_ , _ALL_, and _N_?
2.What are the uses of _NULL_ using in Data Steps? Can we
_NULL_ in Proc Steps also?
3.How do call the macro variable in Data Steps?
4.How to construct Pivot tables in Excel Using SAS?
| | 2 |
| what is the main difference between rename and label? (don't
say that they both perform the same function). | Parexel | 9 |
| How would you code a merge that will write the matches of
both to one data set, the non-matches from the left-most
data set to a second data set, and the non-matches of the
right-most data set to a third data set. | Accenture | 9 |
| How would you include common or reuse code to be processed
along with your statements? | Accenture | 3 |
| what are the advantages of using SAS in clinical data
mangement? why should not we use other software products in
managing clinical data? | Wockhardt | 1 |
| How would you delete observations with duplicate keys? | | 5 |
| What is the difference between an informat and a format?
Name three informats or formats. | Accenture | 8 |
| how do u test a pros sql(works or not) without executing it? | HSBC | 1 |
| |
| For more SAS Interview Questions Click Here |