Skip to main content

[archive] Wrunnet

  • August 2, 2006
  • 6 replies
  • 0 views

[Migrated content. Thread originally posted on 01 August 2006]

Is there someone that has a sample using wrunnet from dotnet to initialize, call and cancel a program.
Thanks for any info
Flavio

6 replies

[Migrated content. Thread originally posted on 01 August 2006]

Is there someone that has a sample using wrunnet from dotnet to initialize, call and cancel a program.
Thanks for any info
Flavio
Have you checked out the sample \\AcuGT\\sample\\NetToAcuCobol

[Migrated content. Thread originally posted on 01 August 2006]

Is there someone that has a sample using wrunnet from dotnet to initialize, call and cancel a program.
Thanks for any info
Flavio
I have verified but in all samples there is no example using wrunnet.dll, but it uses the acugt objects
Flavio

[Migrated content. Thread originally posted on 01 August 2006]

Is there someone that has a sample using wrunnet from dotnet to initialize, call and cancel a program.
Thanks for any info
Flavio
I have verified but in all samples there is no example using wrunnet.dll, but it uses the acugt objects
Flavio

[Migrated content. Thread originally posted on 01 August 2006]

Is there someone that has a sample using wrunnet from dotnet to initialize, call and cancel a program.
Thanks for any info
Flavio
I have implemented wrunnet.dll as follows:


    • add a reference to wrunnet.dll to my .NET project
    • instantiate a CVM object (i.e. private CVM myCVM = new CVM)
    • set the ConfigFile property to point to my ACUCNFG.SQL file (i.e. myCVM.ConfigFile = "C:\\ACUCNFG\\ACUCNFG.SQL")
    • invoke the Call method on the CVM (i.e. myCVM.Call(, , , ))

[Migrated content. Thread originally posted on 01 August 2006]

Is there someone that has a sample using wrunnet from dotnet to initialize, call and cancel a program.
Thanks for any info
Flavio
I have implemented wrunnet.dll as follows:


    • add a reference to wrunnet.dll to my .NET project
    • instantiate a CVM object (i.e. private CVM myCVM = new CVM)
    • set the ConfigFile property to point to my ACUCNFG.SQL file (i.e. myCVM.ConfigFile = "C:\\ACUCNFG\\ACUCNFG.SQL")
    • invoke the Call method on the CVM (i.e. myCVM.Call(, , , ))

[Migrated content. Thread originally posted on 01 August 2006]

Is there someone that has a sample using wrunnet from dotnet to initialize, call and cancel a program.
Thanks for any info
Flavio
With the 7.2.0 release there is a sample program that demonstrates using wrunnet.dll.

It can be found in the directory:
\\Acucorp\\Acucbl720\\AcuGT\\sample\\wrunnetutil

The sample is in the format of a Visual Studio 2003 .NET Project.

Here is a smaller sample of calling the wrunnet.dll from C#:

[HTML]
using System;
using acucobol; // this namespace is in wrunnet.dll. Added in references (Add reference)

namespace NetSample
{
public class NetSample
{
public CVM acuCobol;

public NetSample() // constructor
{
// Instantiate the Cobol Virtual Machine Class
// See Object Browser wrunnet, namespace acucobol, class CVM
acuCobol = new CVM();
}

// Set Acucobol Runtime Properties and call Initialize
public bool InitAcuCobol(string RuntimeParams)
{
// You can set runtime options using properties and or a string
// containing runtime command line options.
// You can mix both types, parameter string and properties.
// If you use only properties you can call Initialize without
// a parameter string. acuCobol.Initialize();

acuCobol.ListConfig = true;
acuCobol.Debug = true;
acuCobol.ErrorsOut = "c:\\\\temp\\\\error.log";

acuCobol.Initialize(RuntimeParams);
return true;
}
// execute an Acucobol program
public bool ExecuteCobolPgm(string PgmName )
{
// This holds parameters for cobol linkage section and entry params
// See Documentation
object [] paramObjects = null;

// See Documentation
byte [] cblTypes = null;

// See Documentation or Onject Browser for values
acucobol.errorTypes rtn;

int CobolReturnCode = 0;

rtn = acuCobol.Call(PgmName,
ref paramObjects,
ref cblTypes,
null,
ref CobolReturnCode);
return true;
}
// Stop the runtime
public bool StopAcuCobol()
{
acuCobol.ShutDown( 0 );
return true;
}
}
}
[/HTML]