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?

Answers were Sorted based on User's Feedback



1.What is the difference between _NULL_ , _ALL_, and _N_? 2.What are the uses of _NULL_ using in Da..

Answer / chandrakanth

_null_ will act like any other data step but it would not create any data set.

_all_ will select all the variables in a particular data set.

_n_ is the automatic variable generated by SAS which counts the number of loops SAS moved to the top of data set
(but some people say it is total number of observations which is not always true)

Is This Answer Correct ?    3 Yes 0 No

1.What is the difference between _NULL_ , _ALL_, and _N_? 2.What are the uses of _NULL_ using in Da..

Answer / aravind9882

_null_ is used in datstep not to create a dataset.

_all_ means all..foe instance all variables like char and
numeric...if u use in ods statement like ods _all_ close
closes the all d destinations u have opened instead of
writing each...

u can cal a macro bariable using '&' lke call symget...

Is This Answer Correct ?    1 Yes 3 No

1.What is the difference between _NULL_ , _ALL_, and _N_? 2.What are the uses of _NULL_ using in Da..

Answer / pnprasad

1. _NULL_ is not create Out put DataSet, it opens the file
to write the dataset. _ALL_ for display contents in the
library & used in cose the files in ODS and _N_ for search
for Null characters.

Is This Answer Correct ?    0 Yes 19 No

Post New Answer

More SAS Interview Questions

What are the statements in proc sql?

0 Answers  


What is program data vector (pdv)?

0 Answers  


Can Some one Explain How the Datasets from SAS can be loaded in to the MVS OS?

1 Answers   HCL,


Given an unsorted data set, how to read the last observation to a new data set?

0 Answers  


What does error:1 mean?

8 Answers   Accenture,






Can you use a macro within another macro? If so how would SAS know where the current acro ended and the new one began?

1 Answers  


data voter; input Age Party : $1. (Ques1-Ques4)($1. + 1); datalines; 23 D 1 1 2 2 45 R 5 5 4 1 67 D 2 4 3 3 39 R 4 4 4 4 19 D 2 1 2 1 75 D 3 3 2 3 57 R 4 3 4 4 ; Idont understand what the (Ques1-Ques4)($1. + 1) means. I have seen (Ques1-Ques4)(4*$1.), but what is (Ques1-Ques4)($1. + 1)? Appreciate all help Thanks

3 Answers  


which domain is better in sas? clinical trails or banking

3 Answers  


what are scrubing procedures in SAS?

1 Answers   Oracle,


What are TEAEs

2 Answers   Accenture, Quintiles,


how to perform paired t-test using Base/SAS & SAS/Stat?

2 Answers  


data data1; input dt account; format dt date9.; cards; 1745 1230 1756 1120 1788 1130 1767 1240 ; data data2; input startdt enddt total; format startdt date9. enddt date9.; cards; 1657 1834 12300 1557 1758 16800 1789 1789 12300 1788 1345 12383 1899 1899 13250 ; proc sql; create table data3 as select * from data1 as x left join data2 as y on x.dt>=y.startdt and x.dt<=y.enddt; quit; Here, we are getting cartision product. But,I want left join report consisting of this program. It should not get duplicate values. you can modify the program also.

0 Answers  


Categories