Account_nbr '2' is closed in nov and monthly dataset will not have a record for 2 in dec.
This is a huge dataset with millions of records across several years. I am looking to create a dummy row for account_nbr '2' for the latest month end i.e 31dec16 with the values from nov. For acct_nbr '3' nov month end record too, for that I would need to create records for nov and dec. since dec is the latest month end in my dataset. Please suggest a easy way to do this.
The benefit of a SET statement coupled with a BY statement is that you know when you've reached the last record for a by group. And if that last record precedes 31dec2016, you also know to output more records:
if last.account_nbr and month_end<'31dec2016'd then do until (month_end='31dec2016'd);
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.