Who issued the RC04?
What was the error message text?
If you mead File Status 04:
"A READ statement was successfully executed, but the length of the record being processed did not conform to the fixed file attributes for that file."
The VSAM file read statement returned a status code of 04. I looked this up and this seems to be the error message.
There're a number of other records in my file with the same length as the record causing this error. But they're not erroring out.
Any idea how to find the cause of this error?
In the program, we've two record layouts defined in the FD section. Both of length 6330 and with two variable length tables with occurs of 60 & 20.
The 01 item looks like,
05 Key X(40)
05 Tbl1 X(66) occurs 60 times
05 Tbl2 X(80) occurs 20 times
If both 01s are the same length and you did not specify a recording mode, COBOL is assuming that the file is fixed which justifies the FS04.
If the file is really VB, specify such in the FD or add another 01 of a different length.