Accessing RM Data files from Managed Visual COBOL


I know it is possible to access RM/COBOL indexed files from a Visual COBOL Console app and that this app can be called by a Managed VC app.

But is it possible to use RM/COBOL indexed files directly from Managed code? If not, are you planning to add that support? It is crucial to move apps into Visual COBOL.


  • The capability of directly accessing both RM and ACU data files from within a managed code application is already in Visual COBOL.

    Please see the product documentation here:


  • Hi Chris,

    Since what version is this supported? I am using 2.1 and no error happens but all data is empty.


  • Latest 2.2 version does not show RM data. Do you have a sample?

  • Access to ACU and RM data files has been supported since 2.1 through the IDXFORMAT directive or FILETYPE directive where 17 correcsponds to ACU and 21 corresponds to RM.

    We have also added some features to the extfh.cfg file such as INTEROP and FOLDERS specification.
    Please see the documentation here:

    If you had an older release of Visual COBOL installed it may have installed a separate add on for Vision file support.
    You may have to go to control panel and remove this add on.
    Also the environment variables that were required previously on older versions are no longer required and should be removed from your computers environment if you are setting them.

    This includes A_CONFIG and CONVERTSTATUS=RM.

    A really simple example that will work in managed or native code is the following which uses IDXFORMAT"21" directive instead of using extfh.cfg file.

          program-id. Program1.
         $set idxformat"21"
              select rm-file assign to "testfile.dat"
                             organization is indexed
                             access is dynamic
                             record key is key1
                             file status is file-status.

          data division.
          fd rm-file.
          01 rm-record.
             05 key1  pic 9(3).
             05 rest  pic x(5).
          working-storage section.
          01 file-status pic x(2).
          procedure division.

              open output rm-file
              display "open = " file-status

              perform varying key1 from 1 by 1 until key1 > 10
                 move all "X" to rest
                 write rm-record
                    invalid key
                     display "error = " file-status

              close rm-file

  • Hi Chris,

    It works fine on a Console application (native), but on a Windows Form Managed Cobol no error is shown but data is empty.

    Is anyone using RM/COBOL indexed files inside a Windows Form Cobol Managed app in Visual COBOL?


  • I have the same problem using a Managed Console Application. Only works with native.

  • Well, I found the solution in ahother thread:

    I have found that the 9/198 error when reading a vision file is a result of compiling the application for "Any CPU" on a 64 bit windows machine.  The fix that I have used is to change the "Platform target" on the COBOL configuration page for the project to "x86"

  • This is not a limitation in the latest product release.

    I just tested this using a Winform application set to anyCPU using Visual COBOL 2.2 update 1 and it created and accessed both RM and ACU files correctly.