Spawning...

General discussion on the JZOS batch launcher and toolkit
Post Reply
hagai2003
Posts: 3
Joined: Thu May 18, 2006 1:54 am

Spawning...

Post by hagai2003 »

Hi,

I'm interested in writing WTO messages from a JAVA program.
I know JZOS has this option but I'm not allowed to use it in our facilities so I've written a JNI program in C that uses the function _console() to write WTO messages and I'm using JAVA+JNI to execute it succesfully.

Now, when I run it in batch, it only write the WTO to the console (SYSLOG) but not to the JESMSGLG.
I understand that the JAVA doesn't run in the job's address space and that's probably the reason, so I use these parameters in the job:

_‎BPX_SPAWN_SCRIPT=YES
_BPX_SHAREAS=YES

and the job works fine, it prints the JESMSGLG to the job's spool (JESMSGLG).

Everything's working great...BUT the problem is that using these parameters (_‎BPX_SPAWN_SCRIPT=YES and _BPX_SHAREAS=YES) only works in a user that has UID=0.

I couldn't get it to work in a user with UID other than 0.
I also read about it here that the user probably needs UID 0 :
http://www-1.ibm.com/support/docview.ws ... sg1OW53909

So my question is how JZOS works - can it WTO to the JESMSGLG without those 2 parameters ? if yes, how can it do it without UID 0?

regards,

Hagai Izenberg.
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

At least your facility allows you to ask questions in the JZOS forum :-)

The JZOS batch launcher starts the Java JVM in the same/original batch address space, so WTOs work just fine.

It is possible to use BPXBATSL to start the java USS shell command launcher in the same address space, without UID=0, but you have to use the 'PGM' option instead of the 'SH' option. Check the Unix System Services Guide and reference for details on how to do this. The limitation of which you speak is documented clearly; why they haven't fixed it is the only mystery!

Also, for IBM's announcement regarding intention for full support of JZOS in the z/OS SDK, see:

http://www-03.ibm.com/servers/eserver/z ... press.html

Maybe someday soon you'll get to use JZOS!
Post Reply