MadAboutCoffee
MIS
hello,
i hope someone could help me with my query.
I already have a running code for this but is trying to convert it to become a volatile code/table.
However, I am not so sure if data set can be used for volatile.
Currently, this is the code that I use to get the last record of a specific ID based on the 'Acct_mod_dt' (Account modification Date).
1st is to sort the data set by ID and acct_mod_dt:
proc sort data=total_member_base out=total_member_base_sort;
by id acct_mod_dt;
2nd is to just leave all the IDs which are not 'N' in status and then get the latest entry based on the modification date:
data max_eff_from_dt;
set total_member_base_sort;
by id acct_mod_dt;
if last.id;
if status ne 'Y' then delete;
run;
I have attached an Excel file with simple illustration of what the outcome should be.
Thank you soooo much!
i hope someone could help me with my query.
I already have a running code for this but is trying to convert it to become a volatile code/table.
However, I am not so sure if data set can be used for volatile.
Currently, this is the code that I use to get the last record of a specific ID based on the 'Acct_mod_dt' (Account modification Date).
1st is to sort the data set by ID and acct_mod_dt:
proc sort data=total_member_base out=total_member_base_sort;
by id acct_mod_dt;
2nd is to just leave all the IDs which are not 'N' in status and then get the latest entry based on the modification date:
data max_eff_from_dt;
set total_member_base_sort;
by id acct_mod_dt;
if last.id;
if status ne 'Y' then delete;
run;
I have attached an Excel file with simple illustration of what the outcome should be.
Thank you soooo much!