01-19-2012 12:37 AM
There are 100 variable in a dataset .I want to select 70 variable with out change any change in dataset by using macro code .
Kindly help me
01-19-2012 01:18 AM
You can use colon operation to select some variables started with the same characters.
set have(keep= abc: );
If your logic is more complicated then use dictionary table columns and LIKE operation to push the variables you need into a macro variable.
01-19-2012 04:50 AM
What does your dataset look like ?
and what type of variables do you want to pull out?
You should post an example, then someone will help you .
01-19-2012 05:52 AM
My dataset contain 100 variable .It is contain both character and numeric variable.So I have to keep 70 variable out of 100 variable.Is there any way to create a dataset using macro code with out using keep and drop statement.
01-19-2012 10:32 PM
I think Answer is Yes.
Could you post an example? Like
I have a table look like:
name sex age weight height
Patrick M 25 65 121.2
I want to pull out sex and height.
You 'd better to illustrate the logic of pulling out . Like
I want to pull out 2th,5th variables.
01-20-2012 05:51 AM
I have an data set contain colomn A , B , C, D, E , F , G , H...........Z The required data set is contain only 3 colomn like A,C,G,K ,O, P .Pls write code using macro code .