[Migrated content. Thread originally posted on 03 March 2009]
Hey guys, I'm trying to figure out how to call cobol from .NET using the .NET Interface Assembly, "wrunnet.dll".I can't seem to find any example in the AcuGT documentation.
Just to experiment:
IDENTIFICATION DIVISION.
PROGRAM-ID. AcuAddNumbers.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SPECIAL-NAMES.
DATA DIVISION.
FILE SECTION.
WORKING-STORAGE SECTION.
LINKAGE SECTION.
01 number1 pic s9(9) comp-5.
01 number2 pic s9(9) comp-5.
01 number3 pic s9(9) comp-5.
PROCEDURE DIVISION USING number1, number2, number3.
PRINTSCREEN-MAIN-PARA.
compute number3 = number1 number2.
EXIT PROGRAM.
compiled it with "ccbl32 --netdll:2.0" option.
it created "AcuAddNumbers.dll, AcuAddNumbers_CVM.dll, AcuAddNumbers.acu"
Now when I try to run a VB.NET program to use the AcuAddNumber,
I'm getting: "Could not load file or assembly 'wrunnet, Version=8.1.0.0, Culture=neutral, PublicKeyToken=9045b74f3449b506' or one of its dependencies. An attempt was made to load a program with an incorrect format." error message. Can anyone tell me what the problem is or post an example of calling the cobol program. Thanks in advance.
AcuGT Extend 8.1, Visual Studio 2005



