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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What do the put and input function do?

789


Mention some common errors that are usually committed in sas programming.

808


how we can create a FLAG datasets? Ex:-ID age_group no_persons 1 to 10 10 to 20 3 11 to 20 21 to 30 7 21 to 3o 31 to 40 5

1874


How can you limit the variables written to output dataset in data step?

1031


How to convert a numeric variable to a character variable?

869


What are the differences between proc means and proc summary?

807


what is hierarchy flattening? : Sas-di

831


sas implementing companies in pune implementing clinical projects if anyone knows plz send ans immediately

3347


What are the differences between sum function and using “+” operator?

790


What are the different operating system platforms in which we can use sas? : sas-grid-administration

806


What is the good sas programming practices for processing large data sets?

873


explain the difference between alternate key, business key, foreign key, generated key, primary key, retained key and surrogate key ? : Sas-di

808


what is sas olap server? : Sas-di

967


How does SAS handle missing values in: assignment statements, functions, a merge, an update, sort order, formats, PROCs?

1313


What is interleaving in SAS?

859