I am working my way through "Visual COBOL, a developer's guide to modern cobol". I found an example on page 99 of "calling native code from managed COBOL". Now our environment is LINUX and we use Java not .NET. Does anyone have an example of this for JAVA and LINUX or is this even possible?
#nativecobol#COBVJM$COBDIR/demo/jvm_cobol/JVMNativeInterop is a delivered demonstration on how to call native COBOL from JVM COBOL
Regards
Yvon
I am working my way through "Visual COBOL, a developer's guide to modern cobol". I found an example on page 99 of "calling native code from managed COBOL". Now our environment is LINUX and we use Java not .NET. Does anyone have an example of this for JAVA and LINUX or is this even possible?
#nativecobol#COBVJMThe sample Yvon described is your best starting point for now. If you have specific questions after trying it out we'll be glad to help.
Paul Kelly, the author of Visual COBOL: A Developer's Guide to Modern COBOL, is working on a book for JVM COBOL.
(Incidentally: Neither "Java" nor "Linux" are acronyms, just proper nouns. There's no need to write them in block capitals.)
I am working my way through "Visual COBOL, a developer's guide to modern cobol". I found an example on page 99 of "calling native code from managed COBOL". Now our environment is LINUX and we use Java not .NET. Does anyone have an example of this for JAVA and LINUX or is this even possible?
#nativecobol#COBVJMThanks. I have got my test to run. I have one further question, I need to be able to invoke my mixed program with just the "java" command and not "cobjrun". It works with "cobjrun", but when I use "java" instead of "cobjrun" (the rest of the command is the same), I get this error.
com.microfocus.cobol.program.COBOLProgramLoadException: 173 Called program file not found in drive/directory [ap01a.so]
(107 Operation not implemented in this Run-Time System [Cannot load native COBOL programs in pure JVM COBOL runtime.])
Any ideas?
I am working my way through "Visual COBOL, a developer's guide to modern cobol". I found an example on page 99 of "calling native code from managed COBOL". Now our environment is LINUX and we use Java not .NET. Does anyone have an example of this for JAVA and LINUX or is this even possible?
#nativecobol#COBVJMcobjrun has to be used.
Regards
Yvon
MF DOC:
Micro Focus Developer > Visual COBOL Development Hub 3.0 > Programming > Using COBOL and Java Together > Considerations
Java/COBOL Application Launcher
" ">documentation.microfocus.com/.../GUID-7CA1C8A2-BFED-41A1-A7EA-599F01671A44.html
I am working my way through "Visual COBOL, a developer's guide to modern cobol". I found an example on page 99 of "calling native code from managed COBOL". Now our environment is LINUX and we use Java not .NET. Does anyone have an example of this for JAVA and LINUX or is this even possible?
#nativecobol#COBVJMThat will not work for this situation, the "top" of the solution is a java class, and the whole thing is to run under TUXEDO as a service. TUXEDO will launch the JVM, I can set any environment variables and classpath as well as properties (java -D) but I cannot get it to call cobjrun.
I am working my way through "Visual COBOL, a developer's guide to modern cobol". I found an example on page 99 of "calling native code from managed COBOL". Now our environment is LINUX and we use Java not .NET. Does anyone have an example of this for JAVA and LINUX or is this even possible?
#nativecobol#COBVJMYou might try creating a symbolic link for cobjrun named java, and place it on the PATH before the java binary would occur.
I am working my way through "Visual COBOL, a developer's guide to modern cobol". I found an example on page 99 of "calling native code from managed COBOL". Now our environment is LINUX and we use Java not .NET. Does anyone have an example of this for JAVA and LINUX or is this even possible?
#nativecobol#COBVJMTUXEDO does not actually use the "java" command, they have their own executable that instantiates the JVM (kind of like cobjrun does) but with more stuff going on.
I am working my way through "Visual COBOL, a developer's guide to modern cobol". I found an example on page 99 of "calling native code from managed COBOL". Now our environment is LINUX and we use Java not .NET. Does anyone have an example of this for JAVA and LINUX or is this even possible?
#nativecobol#COBVJMCan you compile your COBOL code as JVM COBOL rather than native?
Barring that, you'll probably have to run your native COBOL as a separate process and communicate with it using some form of IPC.
I am working my way through "Visual COBOL, a developer's guide to modern cobol". I found an example on page 99 of "calling native code from managed COBOL". Now our environment is LINUX and we use Java not .NET. Does anyone have an example of this for JAVA and LINUX or is this even possible?
#nativecobol#COBVJMI would like to get there eventually, but in the short term no. (SYBASE db precompile uses native Sybase SQL whereas OpenESQL uses a generic form of SQL and we have lots of embedded SQL). Separate Process would be quite a bit of work as well.
I am working my way through "Visual COBOL, a developer's guide to modern cobol". I found an example on page 99 of "calling native code from managed COBOL". Now our environment is LINUX and we use Java not .NET. Does anyone have an example of this for JAVA and LINUX or is this even possible?
#nativecobol#COBVJMI have been goggling around "Java TUXEDO" and see no evidence of TUXEDO which would be using "their own executable that instantiates the JVM (kind of like cobjrun does) but with more stuff going on"...
Would you elaborate on this.
I found in TUXEDO DOC the PATH has to point to the bin directory of the installed JRE ... which would indicate TUXEDO/java use the java launcher ... !?
Also, taking this URL
docs.oracle.com/.../pgapi.html
Would you be trying to invoke JVM COBOL here?
...
rply = myAppCtxt.tpcall("SVC", rqStr, TPNOTIME|TPSIGRSTRT);
/* !? Invoke JVM COBOL here !? */
rtn = TuxAppContextUtil.tpappthrterm();
...
I don't have right now TUXEDO on line and never played so far with TUXEDO/Java ...
docs.oracle.com/.../javaservadmin.html
Oracle Tuxedo Java Server Administration
docs.oracle.com/.../pgint.html
Introduction to Oracle Tuxedo Java Programming
docs.oracle.com/.../index.html
Introduction to Oracle Tuxedo Java Programming
Regards
Yvon