Vision File Access in Visual Cobol

[Migrated content. Thread originally posted on 25 March 2011]

We are very new at the .net world but have purchased Visual Cobol because it can access our current vision file data without converting the data (so we understand).

Our first issue is that we can't seem to find a way to get a project to see our current vision data files. Can someone please send me some pointers/clues/hints on how you get a new project to see a vision data file.

Thanks for ANY help.
Parents
  • Verified Answer

    It is true that currently the Acu Vision File support is only available in native COBOL applications but these applications, if compiled as .dlls can be called from a managed code application such as a Winform application using a .NET technology known as Platform Invoke.

    Visual COBOL does most of the required work under the covers so you can call these native applications as if they were any typical COBOL subprogram using a linkage section and procedure division using header to pass parameters.

    So if you had a native .DLL named TESTSUB.DLL which looked like:

    id division.
    program-id. TESTSUB.
    working-storage section.
    01 pass-param pic x(20).
    procedure division using pass-param.

    *> access Vision files and pass back data.
    goback.

    this could be accessed in the managed code application using the standard:

    call "TESTSUB" using pass-param

    TESTSUB.dll should be placed in the same location as the main .EXE of the application so that it can be found.

    Also, look at the ILPINVOKE compiler directive for more information.

    There is also a small sample program that demonstrates this functionality.
    Please see C:\Users\Public\Documents\Micro Focus\Visual COBOL 2010\Samples\pinvoke

    Thanks.
Reply
  • Verified Answer

    It is true that currently the Acu Vision File support is only available in native COBOL applications but these applications, if compiled as .dlls can be called from a managed code application such as a Winform application using a .NET technology known as Platform Invoke.

    Visual COBOL does most of the required work under the covers so you can call these native applications as if they were any typical COBOL subprogram using a linkage section and procedure division using header to pass parameters.

    So if you had a native .DLL named TESTSUB.DLL which looked like:

    id division.
    program-id. TESTSUB.
    working-storage section.
    01 pass-param pic x(20).
    procedure division using pass-param.

    *> access Vision files and pass back data.
    goback.

    this could be accessed in the managed code application using the standard:

    call "TESTSUB" using pass-param

    TESTSUB.dll should be placed in the same location as the main .EXE of the application so that it can be found.

    Also, look at the ILPINVOKE compiler directive for more information.

    There is also a small sample program that demonstrates this functionality.
    Please see C:\Users\Public\Documents\Micro Focus\Visual COBOL 2010\Samples\pinvoke

    Thanks.
Children
No Data