[Migrated content. Thread originally posted on 09 August 2011]
Ok, first off I'm not 100% sure of the Micro Focus enviroment and have not code much COBOL and that as 14 years ago...
I believe we have a MF cobol environment converted to run on SQL server. We seem to have Net Express 6.0 on several Cobol developers machines.
I need to interact with the cobol code (native cobol) with c# code (assemblies). It apprears that the best way to do this by creating cobol.net proxy classes to interact with the native cobol procedures. I would assume that with Net Express 6.0 and or Visual Studio (2008/2010) we can create these proxy classes in cobol.net. However, I don't know much about the whole mirco-focus environment. From my reading on the proxy classes it would make sense to compile the cobol.net proxy to an assembly. Than I would have to add a reference to this proxy class in my c# client application.
1] If you could provide feedback on the above assumptions and questions that would b greatly appreciated.
2] Can I create these proxy classes using c# code? or, is the easy way to use cobol proxies on this side?
3] If i want to call a method in C# class (assembly) how can this be completed from the native cobol/cobol.net side?
All help is greatly appreciated!
There really is no Net Express 6.0 product, the official name would be Studio Enterprise Edition 6.0 which installs into Visual Studio 2008.
You can create both unmanaged "native" applications using SEE 6.0 as well as managed code COBOL applications if you installed the .NET component and license during the product install.
If you are using Visual Studio 2010 for your C# development then perhaps you should look at the Visual COBOL 2010 product as it integrates with VS2010 instead of VS2008.
You can call unmanaged COBOL .dlls directly from C# or managed COBOL using Platform Invoke (P/Invoke).
Because of the data type differences between C# and unmanaged COBOL it is usually easier to create a proxy wrapper program in managed COBOL which actually does the call to the unmanaged code.
C# would instantiate the COBOL wrapper and pass it .NET types as parameters.
The COBOL proxy would then repackage the .NET types to standard COBOL types and make a CALL ...USING to the unmanaged COBOL.
This would be quite a bit more difficult if doing the proxy in C# but this completely depends upon the complexity of the data items involved.
Look at the demo under C:\\Program Files\\Micro Focus\\Studio Enterprise Edition 6.0\\Examples\\Visual Studio Integration\\pinvoke and C:\\Program Files\\Micro Focus\\Studio Enterprise Edition 6.0\\Examples\\Visual Studio Integration\\OrderStatusDemo for examples of doing this.
To go the other way and call C# .NET classes from unmanaged COBOL you would register the assembly to be called for use with COM Interop in Visual Studio and then utilize the COM client support in SEE 6.0 to call the assemblies as if they were standard COM servers.
See demo under C:\\Program Files\\Micro Focus\\Studio Enterprise Edition 6.0\\Examples\\Visual Studio Integration\\cominterop\\CCW.
[Migrated content. Thread originally posted on 09 August 2011]
Ok, first off I'm not 100% sure of the Micro Focus enviroment and have not code much COBOL and that as 14 years ago...
I believe we have a MF cobol environment converted to run on SQL server. We seem to have Net Express 6.0 on several Cobol developers machines.
I need to interact with the cobol code (native cobol) with c# code (assemblies). It apprears that the best way to do this by creating cobol.net proxy classes to interact with the native cobol procedures. I would assume that with Net Express 6.0 and or Visual Studio (2008/2010) we can create these proxy classes in cobol.net. However, I don't know much about the whole mirco-focus environment. From my reading on the proxy classes it would make sense to compile the cobol.net proxy to an assembly. Than I would have to add a reference to this proxy class in my c# client application.
1] If you could provide feedback on the above assumptions and questions that would b greatly appreciated.
2] Can I create these proxy classes using c# code? or, is the easy way to use cobol proxies on this side?
3] If i want to call a method in C# class (assembly) how can this be completed from the native cobol/cobol.net side?
All help is greatly appreciated!
Chris, thanks for the response! Greatly appreciated!
I have a few more quick questions regarding the whole .net c# to native cobol interOP options:
1] Can visual cobol r3 the same or similar to SEE 6.0? Like if I download the free version for 30 days to play with the examples in the C:\\Program Files\\Micro Focus\\Studio Enterprise Edition 6.0\\Examples folder will they work properly?
2] Do I need SEE 6.0 installed on my developer box to experiment with the inter OP options?
3] Can cobol.net be used with wcf so i can expose wcf endpoints as simple HTTP web service, WS* web service and as a TCP/IP end point service?
4] If i do install the free version of visual cobol r3 would i be able to deploy for testing purposes to a test machine with SEE 6.0 or other enterprise software from Micro Focus?
5] Is visual cobol r3 the same as visual cobol 2010?
6] Is visual cobol r4 the same as visual cobol that is installed with SEE 6.0?
Thanks for all your help!!
[Migrated content. Thread originally posted on 09 August 2011]
Ok, first off I'm not 100% sure of the Micro Focus enviroment and have not code much COBOL and that as 14 years ago...
I believe we have a MF cobol environment converted to run on SQL server. We seem to have Net Express 6.0 on several Cobol developers machines.
I need to interact with the cobol code (native cobol) with c# code (assemblies). It apprears that the best way to do this by creating cobol.net proxy classes to interact with the native cobol procedures. I would assume that with Net Express 6.0 and or Visual Studio (2008/2010) we can create these proxy classes in cobol.net. However, I don't know much about the whole mirco-focus environment. From my reading on the proxy classes it would make sense to compile the cobol.net proxy to an assembly. Than I would have to add a reference to this proxy class in my c# client application.
1] If you could provide feedback on the above assumptions and questions that would b greatly appreciated.
2] Can I create these proxy classes using c# code? or, is the easy way to use cobol proxies on this side?
3] If i want to call a method in C# class (assembly) how can this be completed from the native cobol/cobol.net side?
All help is greatly appreciated!
I am a little confused by some of your questions.
Visual COBOL is a completely different product than SEE 6.0.
SEE 6.0 installs into Visual Studio 2008 and is mainly used for mainframe migration projects as it supports CICS, JCL etc for native code running under Enterprise Server.
If your applications require CICS or JCL support then you should only be looking at SEE 6.0 and not Visual COBOL.
Visual COBOL installs into Visual Studio 2010 (also Eclipse) and it is mainly used for .NET (or JVM) managed code development and deployment. It does not currently provide support for CICS or JCL.
If you wish to develop new .NET applications then you should look at Visual COBOL and not SEE 6.0.
Visual COBOL for Visual Studio supports development of WinForms, WPF, ASP.NET Web Sites, Web Applications, Web Services and WCF Applications including WCF hosted Web services.
Visual COBOL has its own set of samples included with the product including the samples that I mentioned earlier for COM Interop. Visual COBOL has a Samples Browser that you can launch which will display what samples are available and optionally let you load them in Visual Studio.
Applications compiled with Visual COBOL will not run with other Micro Focus products like SEE 6.0 or Net Express. They require the COBOL 2010 Runtime product be installed in order to run on a computer where Visual COBOL is not installed. I believe that a trial version of COBOL 2010 Runtime is included with the 30 day Visual COBOL trial. If not, then talk to our sales department and we will set you up with an evaluation copy.
[Migrated content. Thread originally posted on 09 August 2011]
Ok, first off I'm not 100% sure of the Micro Focus enviroment and have not code much COBOL and that as 14 years ago...
I believe we have a MF cobol environment converted to run on SQL server. We seem to have Net Express 6.0 on several Cobol developers machines.
I need to interact with the cobol code (native cobol) with c# code (assemblies). It apprears that the best way to do this by creating cobol.net proxy classes to interact with the native cobol procedures. I would assume that with Net Express 6.0 and or Visual Studio (2008/2010) we can create these proxy classes in cobol.net. However, I don't know much about the whole mirco-focus environment. From my reading on the proxy classes it would make sense to compile the cobol.net proxy to an assembly. Than I would have to add a reference to this proxy class in my c# client application.
1] If you could provide feedback on the above assumptions and questions that would b greatly appreciated.
2] Can I create these proxy classes using c# code? or, is the easy way to use cobol proxies on this side?
3] If i want to call a method in C# class (assembly) how can this be completed from the native cobol/cobol.net side?
All help is greatly appreciated!
I really appreciate your responses. I'm confused too.
I don't mean to ask un-informed questions. I'm trying to learn what we have here and what we can do with current installations.
Here is what I understand the test / production systems are and it's just a 90% guess on my part. We have Studio Enterprise Edition 6.0 installed on developer machines (not on my machine yet). We have an MF cobol installation that has just been migrated to the Micro Focus environment on windows servers with sql server as the database. We have both VS2008 and VS2010 on developer machines. The cobol developers have SEE 6.0 installed with Net Express and some version of a plugin installed in VS2008.
What I want to do is be able to communicate in code either via com, wcf and or tcp/ip (wcf) or natively between the c# code and a cobol proxy (to native cobol).
Now i'm confused can c# (either created in VS2008 or VS2010) talk to the native code.
I was assuming that the server express or server side installation would do cobol.net but maybe there is some server software here that can't interact with .net assembly beside via COM and COM callable wrappers or using PInvoke.
Is there anyway for you to analyst the purchased software from us to say what your migration path is from this point?
*** If we have only SEE 6.0 and Enterprise Server does this mean there is not way to talk to C# code assemblies?
[Migrated content. Thread originally posted on 09 August 2011]
Ok, first off I'm not 100% sure of the Micro Focus enviroment and have not code much COBOL and that as 14 years ago...
I believe we have a MF cobol environment converted to run on SQL server. We seem to have Net Express 6.0 on several Cobol developers machines.
I need to interact with the cobol code (native cobol) with c# code (assemblies). It apprears that the best way to do this by creating cobol.net proxy classes to interact with the native cobol procedures. I would assume that with Net Express 6.0 and or Visual Studio (2008/2010) we can create these proxy classes in cobol.net. However, I don't know much about the whole mirco-focus environment. From my reading on the proxy classes it would make sense to compile the cobol.net proxy to an assembly. Than I would have to add a reference to this proxy class in my c# client application.
1] If you could provide feedback on the above assumptions and questions that would b greatly appreciated.
2] Can I create these proxy classes using c# code? or, is the easy way to use cobol proxies on this side?
3] If i want to call a method in C# class (assembly) how can this be completed from the native cobol/cobol.net side?
All help is greatly appreciated!
I really appreciate your responses. I'm confused too.
I don't mean to ask un-informed questions. I'm trying to learn what we have here and what we can do with current installations.
Here is what I understand the test / production systems are and it's just a 90% guess on my part. We have Studio Enterprise Edition 6.0 installed on developer machines (not on my machine yet). We have an MF cobol installation that has just been migrated to the Micro Focus environment on windows servers with sql server as the database. We have both VS2008 and VS2010 on developer machines. The cobol developers have SEE 6.0 installed with Net Express and some version of a plugin installed in VS2008.
What I want to do is be able to communicate in code either via com, wcf and or tcp/ip (wcf) or natively between the c# code and a cobol proxy (to native cobol).
Now i'm confused can c# (either created in VS2008 or VS2010) talk to the native code.
I was assuming that the server express or server side installation would do cobol.net but maybe there is some server software here that can't interact with .net assembly beside via COM and COM callable wrappers or using PInvoke.
Is there anyway for you to analyst the purchased software from us to say what your migration path is from this point?
*** If we have only SEE 6.0 and Enterprise Server does this mean there is not way to talk to C# code assemblies?
[Migrated content. Thread originally posted on 09 August 2011]
Ok, first off I'm not 100% sure of the Micro Focus enviroment and have not code much COBOL and that as 14 years ago...
I believe we have a MF cobol environment converted to run on SQL server. We seem to have Net Express 6.0 on several Cobol developers machines.
I need to interact with the cobol code (native cobol) with c# code (assemblies). It apprears that the best way to do this by creating cobol.net proxy classes to interact with the native cobol procedures. I would assume that with Net Express 6.0 and or Visual Studio (2008/2010) we can create these proxy classes in cobol.net. However, I don't know much about the whole mirco-focus environment. From my reading on the proxy classes it would make sense to compile the cobol.net proxy to an assembly. Than I would have to add a reference to this proxy class in my c# client application.
1] If you could provide feedback on the above assumptions and questions that would b greatly appreciated.
2] Can I create these proxy classes using c# code? or, is the easy way to use cobol proxies on this side?
3] If i want to call a method in C# class (assembly) how can this be completed from the native cobol/cobol.net side?
All help is greatly appreciated!
I really appreciate your responses. I'm confused too.
I don't mean to ask un-informed questions. I'm trying to learn what we have here and what we can do with current installations.
Here is what I understand the test / production systems are and it's just a 90% guess on my part. We have Studio Enterprise Edition 6.0 installed on developer machines (not on my machine yet). We have an MF cobol installation that has just been migrated to the Micro Focus environment on windows servers with sql server as the database. We have both VS2008 and VS2010 on developer machines. The cobol developers have SEE 6.0 installed with Net Express and some version of a plugin installed in VS2008.
What I want to do is be able to communicate in code either via com, wcf and or tcp/ip (wcf) or natively between the c# code and a cobol proxy (to native cobol).
Now i'm confused can c# (either created in VS2008 or VS2010) talk to the native code.
I was assuming that the server express or server side installation would do cobol.net but maybe there is some server software here that can't interact with .net assembly beside via COM and COM callable wrappers or using PInvoke.
Is there anyway for you to analyst the purchased software from us to say what your migration path is from this point?
*** If we have only SEE 6.0 and Enterprise Server does this mean there is not way to talk to C# code assemblies?
[Migrated content. Thread originally posted on 09 August 2011]
Ok, first off I'm not 100% sure of the Micro Focus enviroment and have not code much COBOL and that as 14 years ago...
I believe we have a MF cobol environment converted to run on SQL server. We seem to have Net Express 6.0 on several Cobol developers machines.
I need to interact with the cobol code (native cobol) with c# code (assemblies). It apprears that the best way to do this by creating cobol.net proxy classes to interact with the native cobol procedures. I would assume that with Net Express 6.0 and or Visual Studio (2008/2010) we can create these proxy classes in cobol.net. However, I don't know much about the whole mirco-focus environment. From my reading on the proxy classes it would make sense to compile the cobol.net proxy to an assembly. Than I would have to add a reference to this proxy class in my c# client application.
1] If you could provide feedback on the above assumptions and questions that would b greatly appreciated.
2] Can I create these proxy classes using c# code? or, is the easy way to use cobol proxies on this side?
3] If i want to call a method in C# class (assembly) how can this be completed from the native cobol/cobol.net side?
All help is greatly appreciated!
C# can call the native SEE 6.0 .dlls directly without any COBOL .NET proxy by using P/Invoke in the same manner as it would call any native .dll written in C or VB for example, but you would have to handle the parameter passing and conversion of .NET types to COBOL in C#.
But this depends completely on how the COBOL .dlls are currently deployed.
Is your current COBOL application a mainframe migration CICS application that is running under Enterprise Server or is it a standalone application that runs under Server Enterprise Edition.
If it is running standalone then the native .dlls can be called by C#.
The only reason to put a .NET COBOL proxy in-between them is to ease the task of parameter passing especially if you have large complex record structures in your linkage section area.
If you wish to create a .NET COBOL proxy then you can do so using Studio Enterprise Edition 6.0 in Visual Studio 2008 to create the COBOL proxy.
If you wish to call a C# class from native COBOL then you can also do this in SEE 6.0 using the OO COM support in the native COBOL product.
You would register the C# class for COM Interop and then it could be called as if it were any other COM Server like Microsoft Word, Excel etc.
If you wish to deploy your existing native COBOL as part of a WCF Service, then you can do that too.
If your COBOL applications are running under Enterprise Server then there is still a method to call them from C# but it involves exposing them as Web Services.
For more detailed information you should probably open up a support incident or contact sales so that we may better assist you in determining your future product path.
[Migrated content. Thread originally posted on 09 August 2011]
Ok, first off I'm not 100% sure of the Micro Focus enviroment and have not code much COBOL and that as 14 years ago...
I believe we have a MF cobol environment converted to run on SQL server. We seem to have Net Express 6.0 on several Cobol developers machines.
I need to interact with the cobol code (native cobol) with c# code (assemblies). It apprears that the best way to do this by creating cobol.net proxy classes to interact with the native cobol procedures. I would assume that with Net Express 6.0 and or Visual Studio (2008/2010) we can create these proxy classes in cobol.net. However, I don't know much about the whole mirco-focus environment. From my reading on the proxy classes it would make sense to compile the cobol.net proxy to an assembly. Than I would have to add a reference to this proxy class in my c# client application.
1] If you could provide feedback on the above assumptions and questions that would b greatly appreciated.
2] Can I create these proxy classes using c# code? or, is the easy way to use cobol proxies on this side?
3] If i want to call a method in C# class (assembly) how can this be completed from the native cobol/cobol.net side?
All help is greatly appreciated!
Chris, thanks for all your work I really appreciate it!
I'm only 3 weeks in to a new job and it looks like this was just a straight migration from MF to Server using Enterprise Server. We have like 200k lines of Cobol and some of the newer code base is in c# VS2008/2010 moving to VS2010 and 4.0 framework. It looks like we will be moving the code to .net in the next few years. I'll have to play around and see if i can make the COM and P/Invoke work. Again thanks and I really appreciate the help!
[Migrated content. Thread originally posted on 09 August 2011]
Ok, first off I'm not 100% sure of the Micro Focus enviroment and have not code much COBOL and that as 14 years ago...
I believe we have a MF cobol environment converted to run on SQL server. We seem to have Net Express 6.0 on several Cobol developers machines.
I need to interact with the cobol code (native cobol) with c# code (assemblies). It apprears that the best way to do this by creating cobol.net proxy classes to interact with the native cobol procedures. I would assume that with Net Express 6.0 and or Visual Studio (2008/2010) we can create these proxy classes in cobol.net. However, I don't know much about the whole mirco-focus environment. From my reading on the proxy classes it would make sense to compile the cobol.net proxy to an assembly. Than I would have to add a reference to this proxy class in my c# client application.
1] If you could provide feedback on the above assumptions and questions that would b greatly appreciated.
2] Can I create these proxy classes using c# code? or, is the easy way to use cobol proxies on this side?
3] If i want to call a method in C# class (assembly) how can this be completed from the native cobol/cobol.net side?
All help is greatly appreciated!
You are quite welcome!