firstobs and obs are working only option wise,but we are
using
infile statement with firstobs and obs in a statement wise?
so
firstobs,obs working at options and statemnts or not?



firstobs and obs are working only option wise,but we are using infile statement with firstobs an..

Answer / kattameedi siva

ex1:
data demo;
set sashelp.class(firstobs=1 obs=6);
run;

ex2:
data demo2;
infile dlm="," dsd firstobs=5;(or) we can use obs=5)
input id name$;
cards;
123,ss
124,sss
125,srrt
123,ss3
124,sss2
125,srrt1
;
run;

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More SAS Interview Questions

Explain what is SAS informats?

0 Answers  


i have a null dataset with 10 variables; i want to print only name of the varibales in log window and also output window.how can we do this one?

6 Answers   GSK,


What is the purpose of the trailing and How would you use them?

8 Answers  


Where do the database management systems store data and how do u import them.

2 Answers   L&T,


Explain bmdp procedure?

0 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  


what are the differences between proc report and proc tabulate?

3 Answers  


why only we use SAS? their r many programmin language like SPSS, Oracle... Why SAS?

2 Answers   Accenture,


what is the primary variable in your study?

3 Answers   Accenture,


what are some problems you might encounter in processing missing values? In data steps? Arithmetic? Comparisons? Functions? Classifying data? : Sas programming

0 Answers  


How long can a macro variable be? A token? : sas-macro

0 Answers  


Name and describe three SAS functions that you have used, if any?

4 Answers   Accenture,


Categories