Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

If you have a data set that contains 100 variables, but you
need only five of those, what is the code to force SAS to
use only those variable?

Answer Posted / ram pabba

It is true to use KEEP option on a dataset to only select
few variables from 100 variables.
We can use KEEP option either on set statement or data
step statement. If we use on SET statement then only the
five variables are created on pdv and only these variables
are sent to the output dataset. If we use KEEP option on
data step statement then all the variables are copied into
pdv and after any maniuplation only the selected variables
on data step statement are processed and sent to output
dataset.

data abc;
set xyz (keep= ab cd ef gh);
run;

data abc(keep= ab cd ef gh ij);
set xyz;
ij=ab+jk;
run;

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

if a variable contain dates like "2015/01"---"2015/12" (yymm) ,How to add day to those dates,if them month is jan then 31 if the month is feb then 28 so on ...

1404


what is the difference between unique key and primary key? : Sas-di

1129


Explain input and put function?

1142


Differentiate between sas functions and sas procedures.

1234


What is the purpose of _character_ and _numeric_?

1068


name several ways to achieve efficiency in your program? : Sas programming

1070


what type of graphs we will create(for 2+years candidates)?

2309


What are the difference between ceil and floor functions in sas?

1350


what do the mod and int function do? What do the pad and dim functions do? : Sas programming

1170


describe about metadata object? : Sas-di

1068


Compare sas with other data analytics tools.

1032


for whom is sas data integration studio designed? : Sas-di

1002


How can sas program be validated?

1034


what is transformation in sas data integration? : Sas-di

1036


how to read the variables in sas? : Sas-administrator

1020