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

Hi im new to sas. I have a file with some charecter variables and some numeric variables now i want to load charecter variables into one datastep and numeric variables into another data step pls let me know Thanks

2 Answers  


What is proc sort?

0 Answers  


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?

4 Answers  


how to assign a macro value to a variable?

8 Answers   CitiGroup,


HOW DO WE CREATE A SAS STORED PROCESS IN SAS EG ?

1 Answers   TCS,






how can you import .csv file in to sas? : Sas programming

0 Answers  


describe how to adjust the performance of data integrator? : Sas-di

0 Answers  


How do you add a number to a macro variable?

2 Answers  


why is sas considered self-documenting? : Sas programming

0 Answers  


What SAS statements would you code to read an external raw data file to a DATA step?

10 Answers   NIIT,


data abc; input x y ; cards; 1 2 5 6 7 8 7 8 1 7 5 7 ; run; Proc Freq data=abc; tables x*y / chisq nopercent nocol norow PLCORR; RUN; If we run the code, we have Polychoric Correlation = 0.9054 in the last table. I want to extract this particular entry with the value. Means I will create one dataset in which this value will be stored/extracted. I need your help in coding this. Please help me out.

2 Answers  


Why is a STOP statement needed for the point=option on a SET statement?

2 Answers   Quintiles,


Categories