MvsJobSubmitter jobStatus error

General discussion on the JZOS batch launcher and toolkit
Post Reply
cscs010
Posts: 37
Joined: Tue Jul 31, 2007 3:50 pm

MvsJobSubmitter jobStatus error

Post by cscs010 »

i am running the MvsJobSubmitter sample from alphaworks and get this error even though the job submits and the status appears to display correctly. i cannot figure out what it is complaining about. nothing is written to stdout.
the job submitted was the JZOSJOB shown below.

java.io.IOException: Invalid output from jobStatus child process: IKJ56211I JOB JZOSJOB(JOB19008) EXECUTING
at com.ibm.jzos.sample.MvsJobSubmitter.getJobStatus(MvsJobSubmitter.java:193)
________
Grow medical marijuana
Last edited by cscs010 on Sat Feb 12, 2011 2:22 pm, edited 1 time in total.
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

It looks like your TSO id has message ids turn on in the profile, which is causing the MvsJobSubmitter sample program to fail when it is trying to read the message that you see (see the IKJmmmm message id?).

You can either turn off message ids for your TSO id (PROF NOMSGID), or you can fix the sample program.

In the MvsJobSummiter class getJobStatus() method, change the following lines of code:

Code: Select all

		StringTokenizer tok = new StringTokenizer(line);
		if (tok.countTokens() < 3 || !tok.nextToken().equalsIgnoreCase("JOB")) {
			throw new IOException("Invalid output from jobStatus child process: " + line);
		}
To this:

Code: Select all

		StringTokenizer tok = new StringTokenizer(line);
		if (tok.countTokens() < 3 ) {
			throw new IOException("Invalid output from jobStatus child process: " + line);
		}
		String next = tok.nextToken();
		if (next.startsWith("IKJ")) {
			next = tok.nextToken();  // skip over msg id
		}
		if (!next.equalsIgnoreCase("JOB")) {
			throw new IOException("Invalid output from jobStatus child process: " + line);
		}
cscs010
Posts: 37
Joined: Tue Jul 31, 2007 3:50 pm

Post by cscs010 »

yes, the problem was that the first token started with IKJ.
A simpler way to get around the probem is just to add the extra nextToken() line so that the word JOB is found in the 2nd token.

thank you for your repsonse.

StringTokenizer tok = new StringTokenizer(line);
String ikj = tok.nextToken();
if (tok.countTokens() < 3 || !tok.nextToken().equalsIgnoreCase("JOB"))
,throw new IOException("Invalid output from jobStatus child process: "
}
________
Silversurfer Reviews
Last edited by cscs010 on Sat Feb 12, 2011 2:22 pm, edited 1 time in total.
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

It might be simpler, but it would then fail if "PROFILE NOMSGID" was set for the TSO userid.
Post Reply