Is there any build in command for AES encryption and decryption in Micro focus COBOL? I have a requirement where i am supposed to AES encrypt/decrypt one column in the file.
Application Delivery Management
Application Modernization & Connectivity
CyberRes
IT Operations Management
Is there any build in command for AES encryption and decryption in Micro focus COBOL? I have a requirement where i am supposed to AES encrypt/decrypt one column in the file.
You basically compile the .NET program as a Class Library (.DLL) and then use COMInterop to register the class as a COM component that can be called from a native program using the Visual COBOL COM domain…
VCCOMClient is a demo program made to be run as a standalone Windows application. I am not sure it will run under Enterprise Server. I have never tried this. It would have to be modified from its default…
On which platform are you running, Windows, Linux/Unix?
Are you compiling to native code or managed code, .NET/JVM?
There is no built-in library function in Visual COBOL that will encrypt/decrypt data but this functionality does exist in the .NET encryption classes.
You can find an example in C# here
There may also be routines in 3rd party libraries that you can call from COBOL that will do this for you.
I am running on Micro focus Windows platform and using native COBOL. I can try .NET class but how can i call it from Native COBOL. Appreciate your response.
You basically compile the .NET program as a Class Library (.DLL) and then use COMInterop to register the class as a COM component that can be called from a native program using the Visual COBOL COM domain support. There is an example writeup here.
I could not find VCCOMDemo.zip file to download from https://community.microfocus.com/cobol/visualcobol/w/wikiid-120/30874/calling-managed-cobol-from-un-managed-code
Appreciate your response.
Sorry about that. I am attaching a version of this demo that has the NX project already imported into the same solution as the VCCOMServer project so you will also have a VCCOMClient project. You can skip the import step and just open up the VCCOMServer.sln file to get both projects.
You can find it here:
I tried to call program VCCOMClient from a batch job in Enterprise server 4.0 (Windows) but its getting failed with RTS0197 error. Please let me know if you have any thought on fixing this error.
CASKC0027E Error executing service 'PGM#NCEAESTT' Execution error : file 'exptnmgr' error code: 197, pc=0, call=1, seg=0 197 Screen handling system initialization error. 19:31:20
VCCOMClient is a demo program made to be run as a standalone Windows application. I am not sure it will run under Enterprise Server. I have never tried this. It would have to be modified from its default state to get it to run as a subprogram in an ES environment. You would most likely have to remove the ACCEPT/DISPLAY statements from it and compile it as a callable routine like a .DLL instead of an .EXE.
I could able to execute the VCCOMClient from a batch job in Enterprise server 4.0 (Windows) by calling program VCCOMClient which is compiled as Micro focus as COBOL dialect and target platform as x64 from another program which is compiled as Enterprise COBOL for Z/OS and target platform as x64