Re: Another way to locate a Job with anMI program
"Paul Jackson" <[email protected]> Sat, 24 May 2008 01:37:05 -0700
| Newsgroups | gmane.comp.lang.as400.mi |
|---|---|
| Message-ID | <[email protected]> |
Thanks Rich, I checked out that chapter and rewrote the program. Works good. -Paul On Tue, May 13, 2008 at 6:47 PM, Rich Hart <[email protected]> wrote: > There is another way as well to locate a job which would not involve > searching through the work control block tables. > > It's outlined in Chapter Nine of Leif's E-Book, "The Work Control Block > Table". The second half of the chapter tells how to use the Job Machine > Index, a system pointer to which is located in the Master Work Control > Block. If the index search operation succeeds, you can get a space pointer > to the entry in the WCB Table describing the job; and from there, your > program would be the same. Of course, access to the Job Machine Index is > limited, I believe, to system state programs. > > Of course, using the Job Index to find your job would involve quite a few > changes to your program! > > From: "Robert Houts" <[email protected]> > To: "'MI Programming on the AS400 / iSeries'" <mi400-Zwy7GipZuJhWk0Htik3J/[email protected]> > Sent: Tuesday, May 13, 2008 7:39 PM > Subject: Re: [MI400] MI program unable to locate job - need assistance > > >> I'm not sure about V6R1 (or 6.1.0 as IBM now calls it), but up to V5R4 >> there >> is still a maximum of 30 tables. Each table can have a maximum of 16,352 >> jobs and the QMAXJOBS system value is limited to 485,000. Thirty tables >> can >> hold up to 490,560 jobs. In the job table header object (QWCBT00) there >> is >> a 2-byte binary field at offset 1CB (decimal offset 459) that contains the >> count of tables. On a system with 13 tables: >> >> Display Job Tables >> MYSYSTEM >> 05/13/08 >> 17:05:58 >> Permanent job structures: Temporary job structures: >> >> Initial . . . . : 32767 Initial . . . . : 16384 >> >> Additional . . . : 500 Additional . . . : 500 >> >> Available . . . : 57008 Available . . . : 12999 >> >> Total . . . . . : 207557 >> >> Maximum . . . . : 391670 >> >> >> >> >> >> ---------------------Entries---------------------- >> >> Table Size Total Available In-use Other >> >> 8 16752384 16352 0 16352 0 >> >> 9 16752384 16352 3454 12898 0 >> >> 10 16752384 16352 10332 6020 0 >> >> 11 16752384 16352 15539 813 0 >> >> 12 16752384 16352 16348 4 0 >> >> 13 11640576 11334 11334 0 0 >> >> >> >> >> Bottom >> >> >> Dumping QWCBT00 reveals the following: >> >> 0001A0 00000000 00000000 00000000 00000000 >> 0001C0 003C0000 0007F600 00000000 0D000000 >> 0001E0 00008000 00000000 234BC6A4 A3000E38 >> >> The second line above shows x'000D' at offset 0001CB. This is decimal >> offset 459, or decimal position number 460 (hex position number 1CC). >> >> I've checked this on at least 10 different systems (V5R2, V5R3, and V5R4) >> with differing numbers of job tables and this field is definitely the >> count >> of tables. >> >> Using this field is the easiest way of ensuring that you will process all >> tables. To future-proof your code, make the array larger and use the >> table >> count for your limit. >> >> >> >> ---wlteihnssf--- >> _______________________________________________ >> This is the MI Programming on the AS400 / iSeries (MI400) mailing list >> To post a message email: MI400-Zwy7GipZuJhWk0Htik3J/[email protected] >> To subscribe, unsubscribe, or change list options, >> visit: http://lists.midrange.com/mailman/listinfo/mi400 >> or email: MI400-request-Zwy7GipZuJhWk0Htik3J/[email protected] >> Before posting, please take a moment to review the archives >> at http://archive.midrange.com/mi400. >> >> > > _______________________________________________ > This is the MI Programming on the AS400 / iSeries (MI400) mailing list > To post a message email: MI400-Zwy7GipZuJhWk0Htik3J/[email protected] > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/mi400 > or email: MI400-request-Zwy7GipZuJhWk0Htik3J/[email protected] > Before posting, please take a moment to review the archives > at http://archive.midrange.com/mi400. > > _______________________________________________ This is the MI Programming on the AS400 / iSeries (MI400) mailing list To post a message email: MI400-Zwy7GipZuJhWk0Htik3J/[email protected] To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/mi400 or email: MI400-request-Zwy7GipZuJhWk0Htik3J/[email protected] Before posting, please take a moment to review the archives at http://archive.midrange.com/mi400.