JNI and OS 390 C/C++ 
Author Message
 JNI and OS 390 C/C++

I want to be able access Java code from an application in assembler
running on MVS and I have not been able to find doucmentation on this.
If any body knows how to do this, were to find documentation or any
information, please reply. So far I can get an assembler program to
call C, which is needed because of JNI; Calling Java from C works fine
under UNIX, but I need to go from assembler on MVS, to C to UNIX.


Tue, 03 Aug 2004 21:11:52 GMT  
 JNI and OS 390 C/C++
Why, on Earth would you want to do that?

You can go from Assembler to C to Java, but ONLY in a USS framework.



Quote:
> I want to be able access Java code from an application in assembler
> running on MVS and I have not been able to find doucmentation on this.
> If any body knows how to do this, were to find documentation or any
> information, please reply. So far I can get an assembler program to
> call C, which is needed because of JNI; Calling Java from C works fine
> under UNIX, but I need to go from assembler on MVS, to C to UNIX.



Tue, 03 Aug 2004 22:01:54 GMT  
 JNI and OS 390 C/C++
Lilia writes ...

Quote:
>I want to be able access Java code from an application in assembler
>running on MVS and I have not been able to find doucmentation on this.
>If any body knows how to do this, were to find documentation or any
>information, please reply. So far I can get an assembler program to
>call C, which is needed because of JNI; Calling Java from C works fine
>under UNIX, but I need to go from assembler on MVS, to C to UNIX

Problem with precision of language here. You need to go "... to C to UNIX" -
what does that mean? Do you need to run under a shell? Are you running
interactively or in batch?

If you make your Assembler LE conforming, you can call both C functions and
UNIIX service requests directly. Haven't yet worked with Java in the mix, but
should be doable. As another posted said, though: why? Although I'm not a fan
of C, it does seem to be the best tool to do what your describing (hmm, do you
even need the C? Why not do it all in Java? Isn't that what "they" are touting
these days?).

Kind regards,

Steve Comstock
Telephone: 303-393-8716
www.trainersfriend.com

256-B S. Monaco Parkway
Denver, CO 80224
USA



Wed, 04 Aug 2004 00:01:09 GMT  
 JNI and OS 390 C/C++


Quote:
> I want to be able access Java code from an application in assembler
> running on MVS and I have not been able to find doucmentation on this.
> If any body knows how to do this, were to find documentation or any
> information, please reply. So far I can get an assembler program to
> call C, which is needed because of JNI; Calling Java from C works fine
> under UNIX, but I need to go from assembler on MVS, to C to UNIX.

Assuming you're talking about Unix System Services under MVS,
then you need to make the assembler program itself run under USS.
If you do that, I don't really see the need for the C interface, but
perhaps JNI assumes the C compiler's parameter passing
conventions.

You probably won't find documentation on this particular
combination. If you convert the Assembler program to
run under USS (which is documented somewhere,) then
you should have smooth sailing.

John Roth



Wed, 04 Aug 2004 07:33:34 GMT  
 JNI and OS 390 C/C++

Quote:

> I want to be able access Java code from an application in assembler
> running on MVS and I have not been able to find doucmentation on this.
> If any body knows how to do this, were to find documentation or any
> information, please reply. So far I can get an assembler program to
> call C, which is needed because of JNI; Calling Java from C works fine
> under UNIX, but I need to go from assembler on MVS, to C to UNIX.

I think you need to define your problem rather better. Have you actually
tried to do this and failed? If so, what error messages and
return/reason codes did you see? If I understand you correctly, you want
to run an Assembler program (LE or non-LE?) in MVS batch and link to a C
program which will, in turn, invoke the JVM. If your Assembler program
is LE-enabled, it's simple; if not, you need to start up an LE enclave
using CEEPIPI. Either way, it shouldn't really be a problem. Make sure
you have POSIX(ON),ALL31(ON), and the correct PATH settings in your job.
You might also try running under BPXBATCH, but it shouldn't be
necessary. I won't go into the reasons why there is no direct
Assembler/Java interface unless anybody is unwise enough to ask...

Tom Grieve



Sat, 07 Aug 2004 04:39:05 GMT  
 JNI and OS 390 C/C++

Quote:


> > I want to be able access Java code from an application in assembler
> > running on MVS and I have not been able to find doucmentation on this.
> > If any body knows how to do this, were to find documentation or any
> > information, please reply. So far I can get an assembler program to
> > call C, which is needed because of JNI; Calling Java from C works fine
> > under UNIX, but I need to go from assembler on MVS, to C to UNIX.

> I think you need to define your problem rather better. Have you actually
> tried to do this and failed? If so, what error messages and
> return/reason codes did you see? If I understand you correctly, you want
> to run an Assembler program (LE or non-LE?) in MVS batch and link to a C
> program which will, in turn, invoke the JVM. If your Assembler program
> is LE-enabled, it's simple; if not, you need to start up an LE enclave
> using CEEPIPI. Either way, it shouldn't really be a problem. Make sure
> you have POSIX(ON),ALL31(ON), and the correct PATH settings in your job.
> You might also try running under BPXBATCH, but it shouldn't be
> necessary. I won't go into the reasons why there is no direct
> Assembler/Java interface unless anybody is unwise enough to ask...

> Tom Grieve

Thanks for the reply; this is what am trying to do, we have these java
stored procedures that are running extremely slow. The SPs are to be
call by the legacy code which is all written in assembler. Since we
haven't gotten any good advice from IBM on how to get these SPs to run
with decent performance, we decided to use the stored procedures as
they are and call them from the assembler application programs. To do
this, since these programs run as batch jobs on MVS, we need to write
c interfaces, using JNI to get to the java programs. I'm just trying
to do the research but I'm ready to throw the towel on this one.

Thanks again,

Lilia Medina



Sun, 08 Aug 2004 22:43:41 GMT  
 JNI and OS 390 C/C++

Quote:

> Why, on Earth would you want to do that?

> You can go from Assembler to C to Java, but ONLY in a USS framework.



> > I want to be able access Java code from an application in assembler
> > running on MVS and I have not been able to find doucmentation on this.
> > If any body knows how to do this, were to find documentation or any
> > information, please reply. So far I can get an assembler program to
> > call C, which is needed because of JNI; Calling Java from C works fine
> > under UNIX, but I need to go from assembler on MVS, to C to UNIX.

Thanks for the reply; this is what am trying to do, we have these java
stored procedures that are running extremely slow. The SPs are to be
call by the legacy code which is all written in assembler. Since we
haven't gotten any good advice from IBM on how to get these SPs to run
with decent performance, we decided to use the stored procedures as
they are and call them from the assembler application prgrams. To do
this, since these programs run as batch jobs on MVS, we need to write
c interfaces, using JNI to get to the java programs.

At some point someone had done this using the SAS c compiler and I am
trying to do the same thing using the IMB c compiler, because we no
longer the SAS c compiler.

Thanks again,

Lilia Medina



Sun, 08 Aug 2004 22:46:43 GMT  
 JNI and OS 390 C/C++
Lilia, I'm surprised IBM hasn't tried to sell you bigger and faster engines
to make up for the speed-DEficient jvm. It is a well known and well
documented fact that java on os/390 (mvs) isn't the best performer. Java on
a sparc-10 will nearly outperform the same thing on a s390 but at 1/100'th
of the cost.

If you really need to speed things up, I would suggest looking at rewriting
the application into something that compiles into native, s/390 binaries.

Please, if you find a solution, post it here!

Best regards,
Bill



Quote:


>> Why, on Earth would you want to do that?

>> You can go from Assembler to C to Java, but ONLY in a USS framework.



>>> I want to be able access Java code from an application in assembler
>>> running on MVS and I have not been able to find doucmentation on this.
>>> If any body knows how to do this, were to find documentation or any
>>> information, please reply. So far I can get an assembler program to
>>> call C, which is needed because of JNI; Calling Java from C works fine
>>> under UNIX, but I need to go from assembler on MVS, to C to UNIX.

> Thanks for the reply; this is what am trying to do, we have these java
> stored procedures that are running extremely slow. The SPs are to be
> call by the legacy code which is all written in assembler. Since we
> haven't gotten any good advice from IBM on how to get these SPs to run
> with decent performance, we decided to use the stored procedures as
> they are and call them from the assembler application prgrams. To do
> this, since these programs run as batch jobs on MVS, we need to write
> c interfaces, using JNI to get to the java programs.

> At some point someone had done this using the SAS c compiler and I am
> trying to do the same thing using the IMB c compiler, because we no
> longer the SAS c compiler.

> Thanks again,

> Lilia Medina



Wed, 11 Aug 2004 22:41:19 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. OS/390 release test periods Re: default variable initialization under os/390 v2r8

2. Cobol OS/390 to C OS/390 V2R6

3. to CS: or not to CS: in F-PC assembler

4. CobAnal for MVS, OS/390 and z/OS New version

5. IBM announces new release of z/OS (OS/390) compiler

6. Python for IBM OS/400 OS/390

7. Books on os/390

8. USA CA Norwalk - IBM MVS-OS/390 Systems Programmer

9. OS/390 Training in Copenhagen/Scandanavia

10. Need title for new OS/390 applications programmer course

11. Public Access OS/390?

 

 
Powered by phpBB® Forum Software