Hi, I am pretty new to SAS programming and teaching myself out of necessity. I am trying to figure out the consecutive days that mean daily water temperature remained below a threshold temperature (8 degrees Celsius). Here is an example of what my data looks like: Minimum Maximum Mean Count Station Date 4.1 10.6 7.9 1 20160102 4.2 9.1 7.6 1 20160103 4.0 8.9 7.3 1 20160104 4.0 9.0 7.4 1 20160105 3.9 8.9 7.0 1 20160106 4.1 9.2 7.9 1 20160107 4.4 10.4 7.8 1 20160108 For station date, the date is set up as yyyymmdd. This can be changed if need be, this is just how we input dates in our database. Minimum, maximum, and mean all refer to water temperature I've already separated all of the mean water temperature data below 8 o C, and all I want are the maximum consecutive days for each year (meaning the maximum number of CONSECUTIVE days that the temperature was below 8 o C. My year data range from 1991-2017. I've tried out some code, but nothing has been very successful yet. I tried modifying this tutorial :http://support.sas.com/kb/33/838.html, but I'm having trouble discerning where parts of the data example come from. This is the data I want: Year Maximum Consecutive Days 1991 20 1992 34 1993 42 1994 26 (for example). What kind of procedure can I use to achieve this?
... View more