Joined: 06 Jun 2008 Posts: 8577 Location: Dubuque, Iowa, USA
A file status 39 means the COBOL program attributes for the data set do not match the physical attributes of the data set. From the COBOL Language Reference manual:
The OPEN statement was unsuccessful because a conflict was
detected between the fixed file attributes and the attributes specified
for that file in the program. These attributes include the
organization of the file (sequential, relative, or indexed), the prime
record key, the alternate record keys, the code set, the maximum
record size, the record type (fixed or variable), and the blocking
So you need to get a LISTCAT of the VSAM data set and compare these attributes to see which don't match and change your program.
Note: for this particular problem, the CI SIZE and shareoptions (among others) don't matter since COBOL doesn't know about them.
I had performed LISTCAT and it seems some of the attributes of the file has been changed, because the file has been DROPPED and created with new KEYLEN and total length during refresh by the application team and this i am not aware of and followed the old parameters, hence the issue.
So, I have updated my code with updated KEY length and other parameters, later it worked.