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

how to remove duplicates using proc sql?

630


I have a SCD Type 2 Dimention for Location In which A Sales Office in Having two Surrogate Keys just because of the change in it's Sales Group. SKey SalesGroup Sales Office BeginDate EndDate 280 SG1 SO1 01APR2000 01APR2010 281 SG2 SO1 02APR2010 31MAR2999 Now while loading the Fact, the Lookup ir returning SKey 280 for records before and after 01APR2010. I am not able to give WHERE condition in the Lookup Properties (TranDate between BeginDate and EndDate). Please help.

1697


Describe the ways in which you can create macro variables? : sas-macro

576


Mention the validation tools used in SAS?

658


If a variable contains letters or special characters, can it be numeric data type?

762






what is the one statement to set the criteria of data that can be coded in any step? : Sas programming

650


What is slibref?

746


What are the uses of sas?

709


How can sas program be validated?

578


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

588


How do you specify the number of iterations and specific condition within a single do loop?

623


Explain substr function?

577


What is the different between functions and PROCs that calculate the same simple descriptive statistics?

1230


Tell me about % include and % eval? : sas-macro

678


Why and when do you use proc sql?

762