i have a data set with 20 observations i want label from
8 to 15 observations ? how you create this one.

Answer Posted / krishna

data c;
infile cards firstobs=8 obs=15;
input name$ sex $ age height weight;
label name='surname';
cards;
Joyce F 11 51.3 50.5
Jane F 12 59.8 84.5
Louise F 12 56.3 77.0
Alice F 13 56.5 84.0
Barbara F 13 65.3 98.0
Carol F 14 62.8 102.5
Judy F 14 64.3 90.0
Janet F 15 62.5 112.5
Mary F 15 66.5 112.0
Thomas M 11 57.5 85.0
James M 12 57.3 83.0
John M 12 59.0 99.5
Robert M 12 64.8 128.0
Jeffrey M 13 62.5 84.0
Alfred M 14 69.0 112.5
Henry M 14 63.5 102.5
Ronald M 15 67.0 133.0
William M 15 66.5 112.0
Philip M 16 72.0 150.0
;


another way


data class;
set sashelp.class(firstobs=8 obs=18);
label name='surname';
run;

Is This Answer Correct ?    23 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a method to debug and test your SAS program?

726


How we can call macros with in data step? : sas-macro

619


what are several options for creating reports in web report studio? : Sas-bi

635


why is sas considered self-documenting? : Sas programming

683


What is the general format of function in sas? : sas-grid-administration

573






Can you execute macro within another macro? : sas-macro

532


How would you define the end of a macro? : sas-macro

613


In sas admin differentiate between roles and capabilities? : sas-grid-administration

563


What are the ways to do a “table lookup” in sas?

595


If you use a symput in a data step, when and where can you use the macro variable? : sas-macro

613


what is broad cast agent? : Sas-bi

601


How many ways to overcome a missing values???

2339


Explain by-group processing?

591


What is program data vector (pdv)?

637


Name types of category in which SAS Informats are placed?

738