singhakshay
MIS
Hi ,
I am new to base sas trying to learn on my own ,
I have a doubt , I have a data set which contain the id of firms , they start from 1991 to 1996 i want to group them into two groups which continue till 1996 for each month of every year and which disappear that mean even for a month the data about the firm is notpresent then i should group them into the second group , I have a small doubt , I am not able to check the month varaible for all the 12 months in a year , i am able to check only for one mnoth
here is my program have a look and tell how can i group then
proc sort data=akshay.temp;
by ID year ; //sorting the dataset //
run;
data new;
set akshay.temp;
if ID in(1:10) and Months eq 1( here I want to check for all the months ) and year eq 1991 (same here till 1996 ) then group = 'continue';
else group = 'discontinue';
proc print data=new;
run;
I am new to base sas trying to learn on my own ,
I have a doubt , I have a data set which contain the id of firms , they start from 1991 to 1996 i want to group them into two groups which continue till 1996 for each month of every year and which disappear that mean even for a month the data about the firm is notpresent then i should group them into the second group , I have a small doubt , I am not able to check the month varaible for all the 12 months in a year , i am able to check only for one mnoth
here is my program have a look and tell how can i group then
proc sort data=akshay.temp;
by ID year ; //sorting the dataset //
run;
data new;
set akshay.temp;
if ID in(1:10) and Months eq 1( here I want to check for all the months ) and year eq 1991 (same here till 1996 ) then group = 'continue';
else group = 'discontinue';
proc print data=new;
run;