I am trying to find a way to create observations based on multiple other ones using SAS.
For example, I have the following table:
+------+--------------------+-------------------+
| ID | START_DATE | END_DATE |
+------+--------------------+-------------------+
| ABC1 | 01FEB201500:00:00 | 30NOV201600:00:00 |
| ABC1 | 01JAN201700:00:00 | 30NOV201800:00:00 |
+------+--------------------+-------------------+
And I would like to create a table where all the timestamps for the period 01JAN2014 to 31DEC2020 are covered. In other words, it would consist of creating 2 more observations to the dataset to look like this;
+------+--------------------+-------------------+
| ID | START_DATE | END_DATE |
+------+--------------------+-------------------+
| ABC1 | 01FEB201400:00:00 | 31JAN201500:00:00 |
| ABC1 | 01FEB201500:00:00 | 30NOV201600:00:00 |
| ABC1 | 01DEC201600:00:00 | 30NOV201800:00:00 |
| ABC1 | 01DEC201800:00:00 | 31DEC202000:00:00 |
+------+--------------------+-------------------+
The SAS code to re-create this example is:
DATA test;
INPUT ID :$4. START_DATE :datetime18. END_DATE :datetime18.;
FORMAT START_DATE datetime20. END_DATE datetime20.;
CARDS;
ABC1 01FEB201400:00:00 31JAN201500:00:00
ABC1 01JAN201700:00:00 30NOV201800:00:00
;
RUN;
I don't see a way to do this in SAS