Re: IBM Mainframe Calling Java from Cobol via JCL Batch STDOUT Issues
- From: "Pete Dashwood" <dashwood@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 8 May 2009 12:25:35 +1200
sjhesse@xxxxxxxxx wrote:
Hi Pete,
thanks for you reply
Presumably "HelloJ" is a Java Class?You're right, this ist HelloJ:
public class HelloJ {
public static void sayHello(){
System.out.println("Hello World!");
}
}
Have you tried calling "sayHello" from Java to make sure it worksI veryfied this class and also checked, that it is working properly
properly?
when invoked by oo cobol. The problem only occurs when
cobol -------> oo cobol -----------> java
call invoke
I veryfied
cobol -------> oo cobol
call
and also
oo cobol -----------> java
invoke
which are working like I expected
Excellent clarification. Thanks.
So the only problem really is CALLing OO COBOL from COBOL...
cobol -------> oo cobol -----------> java
call invoke
What happens if you do this?
cobol -------> oo cobol -----------> java
INVOKE invoke
It may be that the mechanism used to link to a Class is different from the
mechanism used to link to a module...
I note your repository use but I'm not sure if you can includeIt is recommended to that this way. You have to include your java
Java Classes directly in the repository or not.
classes in the repo.
OK. What if you are using late binding? Repository is required for early
binding so that references can be resolved at compile time and compliance
and conformity can be checked. Late binding doesn't normally require it; you
just invoke the fully qualified method of the Class you want. Maybe, in the
Enterprise environment late binding is not an option, or it requires a
repository entry for other reasons.
You mentioned "wrapping" the JVM. Is that necessary? It seems a bitI think you're right, wrapping may the the wrong term. The oo cobol
drastic to me. I would expect that if
uses a shared library to execute the code, I'm not sure if there'll be
a "real" jvm process
Let us know how you get on. This is an interesting problem.
Pete.
--
"I used to write COBOL...now I can do anything."
.
- Follow-Ups:
- Re: IBM Mainframe Calling Java from Cobol via JCL Batch STDOUT Issues
- From: Sascha John Hesse
- Re: IBM Mainframe Calling Java from Cobol via JCL Batch STDOUT Issues
- References:
- Prev by Date: Re: Open-Cobol
- Next by Date: Coming soon: Turbo COBOL from Micro Focus :-)
- Previous by thread: Re: IBM Mainframe Calling Java from Cobol via JCL Batch STDOUT Issues
- Next by thread: Re: IBM Mainframe Calling Java from Cobol via JCL Batch STDOUT Issues
- Index(es):
Relevant Pages
|