use certcode in pos/last_pos table