RunUnit Methods

MicroFocus.COBOL.RuntimeServices

The RunUnit type exposes the following members.

Methods

  NameDescription
Public methodCode exampleAdd
Adds a new instance of a Procedural COBOL program or Object COBOL Class to the session.

This method is only required if you need to instantiate the class outside of the session
Public methodCode exampleCall(String)
Executes a program in the new run-unit with no parameters
Public methodCode exampleCall(String, Object)
Executes a program in the new run-unit with a set of parameters
The parameters are currently restricted to objects or native IL types
Public methodCode exampleCallObject
Executes a program in the new run-unit with a set of parameters
The parameters are currently restricted to objects or native IL types
Public methodCode exampleCancel
CANCEL's a program
Public methodContainsUserData
Checks if a name is bound to this rununit
Public methodDispose
Dispose method for IDisposable interface which invokes StopRun
Public methodCode exampleEnter
Associate the current thread with a RunUnit

Public methodCode exampleGetBytes
Gets the byte[] for a string in the charset of program
Public methodCode exampleGetBytesCount
Gets the length/size of a byte[] for a string in the charset of program
Public methodCode exampleGetEnvironmentVariable
Gets the contents of the specified environment variable
Public methodCode exampleGetInstance(Type)
Given a Type object return the programs instance if the RunUnit knows about it. If an instance does not already exist this call will return null.
Public methodCode exampleGetInstance(Type, Boolean)
Given a Type object return the programs instance if the RunUnit knows about it. If create is true then GetInstance will create an instance of programType if it doesn't already have one. Otherwise it will return null should an instance not exist.
Public methodCode exampleGetString(Object, Byte)
Gets a string that matches the charset of the program
Public methodCode exampleGetString(Object, Byte, Int32, Int32)
Gets a string that matches the charset of the program using an index/count
Public methodCode exampleGetUserData
Returns the object bound with the specific name to the rununit
Public methodCode exampleIsCOBOLProgram
Given a Class object return true if the Class contains anything that is CALLable.
Public methodCode exampleSetEnvironmentVariable
Sets the contents of specified environment variable to the value given.
Public methodCode exampleSetUserData
Binds an object to this rununit using the name specified
Public methodStopRun
Terminates the Run Unit
Public methodStopRun(Int32)
Terminates the Run Unit using the supplied return code value
Public methodToString
Returns a text summary of the status of the rununit.
(Overrides ObjectToString.)
Top
See Also

Reference