the stack contains the pointer to the next record to access, so set current record pointer to it and pop the stack
pop(&s,&ptr);