How to call rexx from a java program on z/os?

General discussion on the JZOS batch launcher and toolkit
Post Reply
usaajrm
Posts: 87
Joined: Tue Feb 06, 2007 3:46 pm

How to call rexx from a java program on z/os?

Post by usaajrm »

Is it possible to call a rexx (compiled or not) from a java program running on z/os? We have a new java program and want to leverage an existing rexx script. Passing parms and getting data and status back is important.

Thanks

John
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

It is fairly easy to invoke a REXX script if it is run as a z/OS Unix REXX script (stored in the HFS/zFS filesystem, without using the TSO command environment).

There are several examples of doing this in the IBM JZOS Sample code. Look at the following classes in the com.ibm.jzos.sample package:

MvsJobOutput
MvsJobSubmitter

The JZOS sample source code is available here:
http://www-03.ibm.com/servers/eserver/z ... rview.html
usaajrm
Posts: 87
Joined: Tue Feb 06, 2007 3:46 pm

Re: How to call rexx from a java program on z/os?

Post by usaajrm »

Looking for some "how does it work?" information related to calling java from rexx. I'm hoping you can provide some insight.

We've been doing java batch for some time and take advantage of the special processors for java programs. btw we get a lot of value out of the coz sftp , cozbatch and launcher.

We have an apache server and run cgi rexx. Now I'm able to execute/call java from the cgi rexx. What I want to know is the java that gets executed, does the java run on the special processors? is there a way to make sure it runs on the special processors?
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Re: How to call rexx from a java program on z/os?

Post by dovetail »

It is obviously not hard to run a java program from a REXX script by just invoking the "java" command - either by using the "SH" environment, or by using bpxwunix(). Either way, the java JVM will run and this calling environment has no impact on whether it will be zAAP/zIIP enabled: the "-Xifa:" switches can be used on the java command line to enable or force zAAP usage.
usaajrm
Posts: 87
Joined: Tue Feb 06, 2007 3:46 pm

Re: How to call rexx from a java program on z/os?

Post by usaajrm »

You guys do not disappoint. Which is why we think a lot about Coz. thanks I added the option to our bpxwunix call. It returned 0. thanks again for your help and patience.
Post Reply