Advertisement
Guest User

Untitled

a guest
Jan 24th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. %macro VintageCss();
  2.  
  3. data VintageCss;
  4. set wej.Transactions;
  5. seniority=intck('month',input(fin_period,yymmn6.),input(period,yymmn6.));
  6. vin3=(due_installments>=3);
  7. vin2=(due_installments>=2);
  8. vin1=(due_installments>=1);
  9. output;
  10.  
  11. if status in ('B','C') and period<='200812' then do;
  12. n_steps=intck('month',input(period,yymmn6.),input('200812',yymmn6.));
  13. do i=1 to n_steps;
  14. period=put(intnx('month',input(period,yymmn6.),1,'end'),yymmn6.);
  15.  
  16. seniority=intck('month',input(fin_period,yymmn6.),input(period,yymmn6.));
  17. output;
  18. end;
  19. end;
  20. where product="css";
  21. keep vin3 vin2 vin1 seniority aid fin_period period cid;
  22. run;
  23. %mend;
  24. %VintageCss();
  25.  
  26. %macro VintageIns();
  27.  
  28. data VintageIns;
  29. set wej.Transactions;
  30. seniority=intck('month',input(fin_period,yymmn6.),input(period,yymmn6.));
  31. vin3=(due_installments>=3);
  32. vin2=(due_installments>=2);
  33. vin1=(due_installments>=1);
  34. output;
  35.  
  36. if status in ('B','C') and period<='200812' then do;
  37. n_steps=intck('month',input(period,yymmn6.),input('200812',yymmn6.));
  38. do i=1 to n_steps;
  39. period=put(intnx('month',input(period,yymmn6.),1,'end'),yymmn6.);
  40.  
  41. seniority=intck('month',input(fin_period,yymmn6.),input(period,yymmn6.));
  42. output;
  43. end;
  44. end;
  45. where product="ins";
  46. keep vin3 vin2 vin1 seniority aid fin_period period cid;
  47. run;
  48. %mend;
  49. %VintageIns();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement