Thanks everone for your help.

It turns out that on the failing system, the number of tables
mentioned below is correct in the QWCBT00 object but the array of
pointers to the WCB tables is not at the expected offset of x'240'
(pos 577) within the space. Very strange.

I think i'll experiment with the API as suggested.

-P

On Tue, May 13, 2008 at 5:39 PM, Robert Houts <rshouts@xxxxxxxxx> wrote:
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@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/mi400
or email: MI400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/mi400.



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-2020 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].