Yeah, the documentation step was a bit of a pain but I'm pretty militant on that 🙂 And fairly good at documenting my code for something that large because I know I won't remember it in a years time.
... View more
Assuming your start and end dates are SAS date valued variables: data want; set have; number=0; do dates = Startdates to date; number + 1; output; end; run;
... View more
Here's an alternative that uses your original version of the data: data have; infile datalines dsd; length policynumber $ 10; input policynumber @@; datalines; m2227eqw,wy3747387,hsdahah schaxnbbxc 847e7w87 47ew7837 ds6778989 fg848484,rt222222,y72378w ; This code doesn't count the policy numbers, because your original code didn't count them. But it does give you each policy number as a separate observation. Good luck.
... View more
May be this will help you PROC FORMAT; inVALUE $WEEK 'Saturday'=1 'Sunday'=2 'Monday'=3 'Tuesday'=4 'Wednesday'=5 'Thursday'=6 'Friday'=7; QUIT; data have1; set have; date1=input(put(date,WEEKDATE9. -l),$week.); /*FORMAT DATE MMDDYY10.;*/ /*FORMAT DATE WEEKDATE9.;*/ RUN; Thanks, Jag
... View more