M204.0243 "in order" not valid in group context
A FOR EACH RECORD...IN ORDER statement refers to a record set from a group. Neither sorted files nor ORDERED fields can be used in group context to retrieve data in sorted order.
Response: Remove the IN ORDER clause, if unsorted processing is acceptable. If you must process records from a group in sorted order, use the Sort statement. If you want to process records from one file in the group and that file is sorted, or the statement specifies IN ORDER BY with an ORDERED field, use the IN filename clause in your Find statement to restrict the set to a single file.
|Sets online return code
|Sets batch (single user) return code
|Error class; the message can be suppressed with the X'04' bit setting of the MSGCTL parameter
|Writes the message with line type ER to the audit trail
|Increments the error count (ERCNT) parameter