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

hi tell be about pfizer? how to compare the work with other companies ? please tell me how to login and work also?

2069


what is sas enterprise intelligence architecture? : Sas-bi

975


Explain how merging helps to combine data sets.

1046


Explain how you can debug and test your SAS program?

1005


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

1158


What is the role of sas grid administrator? : sas-grid-administration

1281


What are the different types of sas functions?

1267


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

968


What are the new features included in the new version of SAS Programming Language?

1204


what is sas application server? : Sas-di

1067


What is the difference between reading data from an external file and reading data from an existing data set?

1168


how can you put a "trace" in your program? : Sas programming

1054


How many ways to overcome a missing values???

2805


What do the PUT and INPUT functions do?

1330


what are the considerations when picking a SAS/STAT procedure?

3365