add DOCNO to export, misc other stuff