|
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 mailing list archive is Copyright 1997-2025 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.