I'm trying to generate incremental data in a dataset based on a pattern.
For example I have a dataset with only 1 field and 1 record with value =2 and I want it to increment by 2 without replacing the old one.
The problem I am having is , when I write the code to generate the pattern, the new value (incremented ) replaces the old value so I only get 1 record.
Here's my code
retain count 0;
if first.num then do;
Once I get the code right, I will be replicating it to generate datetime fields from May 20 1980 to June 6 2008, with dates at 6 hours intervals captured one below the other in the dataset.