title: SAS Fast forward a date until a limit using INTNX/INTCK
body: <p>I'm looking to take a variable observation's date and essentially keep rolling it forward by its specified repricing parameter until a target date</p>
  
  <p>the dataset being used is:</p>
  
  <pre><code>data have;
  input repricing_frequency date_of_last_repricing end_date;
  datalines;
  
  3 15399 21367
  10 12265 21367
  15 13879 21367
  ;
  
  format date_of_last_repricing end_date date9.;
  informat date_of_last_repricing end_date date9.;
  run;
  </code></pre>
  
  <p>so the idea is that i'd keep applying the repricing frequency of either 3 months, 10 months or 15 months to the date_of_last_repricing until it is as close as it can be to the date "31DEC2017". Thanks in advance.</p>
  
  <p>EDIT including my recent workings:</p>
  
  <pre><code>data want;
  set have;
  
  repricing_N = intck('Month',date_of_last_repricing,'31DEC2017'd,'continuous');
  
  dateoflastrepricing = intnx('Month',date_of_last_repricing,repricing_N,'E');
  
  format dateoflastrepricing date9.;
  informat dateoflastrepricing date9.;
  run;
  </code></pre>