RPG (IBM i / AS/400) · File status code
What does Status Code 01031 mean in RPG (IBM i / AS/400)?
In a program using multi-file matching-record processing (the MR concept), the match-field key on an input record from one of the input files was out of the ascending or descending sequence the program expects.
In a program using multi-file matching-record processing (the MR concept), the match-field key on an input record from one of the input files was out of the ascending or descending sequence the program expects.
Confirm the file's access path actually delivers records in the collating sequence the matching-record logic assumes, and reorganize or rebuild the file if records were inserted out of key order.