This forum does not have a provision for attaching files to posts. That rule does not depend on a moderator.
To attach files, please follow the procedure that you used in your previous thread, Reading data into direct access files - #37 by miramar46 .
The effect of a NEXTREC = clause in an INQUIRE statement depends on what has been done with the file earlier in the program. Here is the wording from the 2018 standard:
The scalar-int-variable in the NEXTREC= specifier is assigned the value n + 1, where n is the record number of the last record read from or written to the connection for direct access. If there is a connection but no records have been read or written since the connection, the scalar-int-variable is assigned the value 1. If there is no connection, the connection is not for direct access, or the position is indeterminate because of a previous error condition, the scalar-int-variable becomes undefined.
Perhaps, you misunderstand the role of the NEXTREC= clause in an INQUIRE statement. It does not set the record number for the subsequent READ/WRITE statement; it gets the anticipated record number; the variable after the ‘=’ can be undefined, or have any value whatsoever, prior to executing the INQUIRE statement; when the INQUIRE is executed, that value will be overwritten by the record number that will be used by the next READ/WRITE statement.