O
external raw data file to a Data Step.
EM
Ans: If we want to read a particular variable in a
set of SAS data set, we can mention the variable
we want in the INPUT statement.
D
in SAS. Both these delimiters can be used in
the infile statement
The DLM can read the commas and spaces
as data delimiters. You may choose any delimiters
you wish with this option. You can choose
LS
multiple character such as DLM=”XX” for your
delimiter.
The DSD option allows you to treat two
consecutive delimiters as containing a missing
value.
would you prevent SAS from reading the next record if the
last variable didn’t have a value?
B) Character informat
c) Numeric informat
O
large number of categories.
EM
Ans: Filename fileref ‘path’;
File fileref;
Put _all_ /* will write all the variables. */
Or put the variables which you require.
D
every single variable on the record?
14. Have you ever-linked SAS code? If so, describe the like
and any required statement used to either process the
ST
DATA NEW;
MERGE ONE_TEMP (IN=ONE) TWO_TEMP (IN=TWO);
O
BY NAME;
IF ONE=1 AND TWO=1;
RUN;
EM
21. What is the Program Data Vector (PDV)? What are their
functions?
Ans:
Program Data Vector is the temporary holding area.
For example The WHERE statement is may be more
D
efficient then the sub setting If (especially if you are
taking a very small sunset from a large file) because it
checks on the validity of the condition to see if the
observation is to be kept or not. This temporary holding
area is called the program data vector (PDV).
LS
22. Does SAS ‘Translate’ (compile) or does it ‘Interpret’?
Explain.
A) Input Buffer
B) Program Data Vector(pdv)
SY
C) Descriptor information
O
statement?
EM
file were being read sequentially. Because detecting an end-of-
file condition terminates a DATA step automatically, failure to
substitute another means of terminating the DATA step when you
use POINT= can cause the DATA step to go into a continuous
loop.
NOTE:
You cannot use the POINT= option with any of the
D
following:
BY statement
WHERE statement
WHERE= data set option
LS
transport format data sets
sequential data sets (on tape or disk)
a table from another vendor's relational database
management system.
O
Ans: INPUT data set option, SAS statement option and then
OUTPUT option.
EM
47. What is the order of evaluation of the comparison
operators: + - * /** ()?
Missing Value:
56. How many missing values are available? When might you use
D
them?
internally?
FUNCTIONS:
a6, a9);?
O
64. How would you determine the number of missing or non-
missing value in computation?
EM
MISSING values and NMISS option for the number of
MISSING values.
D
Values if any and compute the sum.
Ans:
O
O
PROC PRINT to see the computed statistics.
EM
PROC FREQ:
D
Ans
The statement for single-level.
DATA MAR.FREQTEST;
SET BAS.AMPERS;
LS
PROC FREQ DATA =MAR.FREQTEST;
TABLE AGE;
RUN;
Ans:
The statement for multilevel.
DATA MAR.FREQTEST;
O
SET BAS.AMPERS;
PROC FREQ DATA =MAR.FREQTEST;
TABLE AGE * gender;
RUN;
ST
87. Explain the message ‘MERGE HAS ONE OR MORE DATASETS WITH
O
REPEATS OF BY VARIABLE’.
EM
88. What is the purpose of the statement DATA_NULL_?
Ans:
Use the keyword _NULL_, which allows the power of the
DATA step without creating a data set.
D
89. What is the pound sign used for the DATA _NULL_?
MACRO:
91. What system option would you use to help debug a macro?
O
Ans: %mend