Skip to main content

I have a KSDS VSAM file that has been extracted from mainframe and converted to Enterprise Server 10 using the VRECGEN and Classic Data tools utilities.  Currently the Cobol program that reads this file is compiled under “Enterprise COBOL for z/OS”.  When I run the cobol program using a DD statement in the JCL the file opens and retrieves data.

I have a need to be able to dynamically supply the file name inside the Cobol program instead of the JCL and have been experimenting with using “ASSIGN TO DYNAMIC” and compiling the program under the “MicroFocus” dialect.  When I try this method to open the file I get a VSAM return code of 39 indicating that the file definition on the server and the definition in the Cobol program don’t match.  

Is this related somehow to the VRECGEN process and is there any way to have the DYNAMIC assignment work?

Also, my platform is Windows and IDE is Visual Studio.