Vsam File Status 39 - Mainframe Cobol

   

  Asked by Anonymous - Vsam File Status 39 - Mainframe Cobol :
When receiving a vsam file error - status code 39 - when run cobol batch, you will see an error message similiar to "A file attribute mismatch was detected. File "name" in program "name" had a file specified in the ASSIGN clause had a record length of 1600. There was an unsuccessful OPEN or CLOSE of file "name" in program "name" at relative location X'17EE'. Neither FILE STATUS nor an ERROR declarative were specified. The status code was 39. From compile unit "name" at entry point TESTPROG at compile unit offset +000017EE at entry offset +000017EE at address 24A557EE."

This error status code 39 is returned most likely because the file length was different then what you defined in your mainframe cobol program.  Start with checking the lengths you defined versus the actual lengths of the mainframe file.

Anonymous Says:
Exact what is was.

The FD section in my cobol program has the wrong length.  Changing this solved the problem.

Anonymous Says:
You have it correct its always some type of length error. I seem to hit this same file status from someone on our team every year at some point, not only with vsam errors but it seems to show up often as flat file errors also.  This might be the most common error I run into.

Add your reply below ...


Your Nickname:

Your Reply:

Type the code: