Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
davide_stfc Absent Member.
Absent Member.
611 views

Calling Cobol from .NET

Hi all.

We use acucobol.CVM class from wrunnet.dll to call COBOL program from .NET module.

 

Unfortunately we get FALSE from the Initialize() method and we do not undestand why. 

Is there a way to get a more detailed error code/message? Some kind of log or something like that ?

 

Thank you

--

Davide Giudici

3 Replies
Micro Focus Contributor
Micro Focus Contributor

RE: Calling Cobol from .NET

A first step would be to call Initialize() with a command line that includes a trace file and a config file that turns on tracing:

Initialize("-c myconfig -le myerr.txt myprog")

And then make sure that myconfig has at least:

A-TRACE 3
FILE-TRACE 3
FILE-TRACE-FLUSH TRUE

Hopefully the myerr.txt file will have some more information about what might be failing.
0 Likes
davide_stfc Absent Member.
Absent Member.

RE: Calling Cobol from .NET

Hi rzack.

I tried your suggestion but with no result (I mean, no trace file created).
I guess that the runtime fail before starting.

--
Davide Giudici
0 Likes
davide_stfc Absent Member.
Absent Member.

RE: Calling Cobol from .NET

Hi all.

I finally get the solution.

My bad ! !

We was trining to call the wrun32.dll from a 64bit .NET application.

Simply changing the configuration from "Any CPU" to "x86" we solve our problem.

 

Thank you all.

--

Davide Giudici

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.