× 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.



Hello
I've been trying to retrive list of jobs from an as/400 machine.
Here is an examle.
 public static void CheckJobQueue(String jobq) {  if (as == null) Connect();  
JobList jobs = new JobList(as);  try {   
jobs.addJobSelectionCriteria(JobList.SELECTION_JOB_QUEUE,jobq);           } 
catch (Exception e) {System.err.println(e.toString()); return ;}    if 
(jobs.getLength() == 0) return;    try {   for (Enumeration e = jobs.getJobs(); 
e.hasMoreElements();) {     Job job = (Job) e.nextElement();     if 
(job.getStatus().compareTo("*ACTIVE") == 0)     
System.out.println(job.toString()+ " " + job.getStatus());   }     
jobs.close();  } catch (Exception e) { return; }   } 
The most important thing is that I want only jobs from specifed jobq.
I use addJobSelectionCriteria JobList.SELECTION_JOB_QUEUE,jobq); 
to select jobs from specified jobq. Unfortuantely the function returns
all jobs runninng on the machine. I've been trying also to add another
selection criteria and then exception occurs
java.lang.ArrayIndexOutOfBoundsException: 1
Can  anyone can me what I've been doing wrong ????
BR
 TJ
PS Java 1.4.2, Win2000, Eclipse 20030723, AS/400 V5R2
JavaToolbox dated 2003-04-18

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.