for (int i=0; i<nHistoryRecords; i++)
{
hst = (THistoryRecord)gLclHstList.get(i);
spc = hst.getHspec();
if (spc.getDepthShort() <= 0) continue;
if (hst.needsToFillSTS) hst.fillSTS();
hst.setArchiveFileName(thisCycleTime); // will also remove outdated files if necessary
skip = (thisCycleTime-hst.getLastAccessTime()) < spc.getPollngRate();
if (hst.isScheduled()) skip = false;
hst.setScheduled(false);
if (skip) continue;