× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



That should work, thanks.

I've used MONMSG before to trigger exception handling, but I have never actually received the message to look at the data. I just did some quick looking at message commands and I was wondering if RTVMSG would be the command that would let me access the first parameter in the message data like you mentioned?



David Gibbs wrote:
Robert Upshall wrote:
I have a 3rd party java program that I want to run with the RUNJVA command. It is possible for that program to end with System.exit(0), System.exit(1), System.exit(2) or System.exit(3).

I want to be able to tell if it was in fact 0,1,2 or 3. Will monitoring for JVA0122 tell me that?

You'll have to interrogate the message data ... but, yes, it will.

For example:
I wrote this quick & dirty program ...

public class TestExit {

public static void main(String[] args) {

String _code = args[0];

int code = Integer.parseInt(_code);

System.exit(code);

}

}


And ran it with the following command: RUNJVA CLASS(TestExit) PARM(10) CLASSPATH('/home/devdmg')
After it completed, JVA0122 was in the job log with this text: 'Java program completed with exit code 10'.

The return code will be in the message data as the first parameter, formatted as binary.

david




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.