Primary key out of sequence (ERR=158) A sequential PUT to an INDEXED file specifies a PRIMARY KEY value lower than that of the preceding record. Sort the records before using PUT on an indexed file.