test for current record to be processed
while(ptr != null)