Hi,
Your example is to delete system table records. That is not allowed. You can only delete UDT. Follow Edy's idea, an easy solution for you is always using DESC order for linenum to delete form bottom so that the top records will always be the same.
Thanks,
Gordon