So I was playing around with using cURL to update the Location field on
many printers at once (see TID 10097674).
Turns out you can edit any PA by simply going to the /PsmStatus/configOpt
page of a particular printer. That "particular printer" is, however,
defined by an ordinal number based on when the printer was installed, not
the PA name - so the first printer created on a PSM would be URL
/PsmStatus/configOpt/0, the second would be /1 and so on.
This is all fine and dandy - except if a PA is deleted and the Manager is
not restarted. The ordinal numbers do not get reset - so let's say you
have 240 printers on your server, the "newest" printer should have a URL
of /PsmStatus/configOpt/239. When you delete a printer, it STAYS at /239
until you reset the mgr, then it becomes /238.
Noting that it would be very dangerous if I just blindly started updating
PA's with the wrong information (one printer off) I was looking for a way
to derive the highest ordinal number as a error checking step - so I went
to the URL that is one higher than I should expect to see (if I get a
response using ordinal number 5 when there are 5 PA's on the server,
that's bad) - and nothing happens (as expected with a URL that
doesn’t exist). Then my co-worker stands up and asks me if I know
that my test server has ABENDed. I say, "huh?" When I looked, it indeed
had ABENDed.
Turns out if you attempt to go to THAT non-existent URL, it abends the

Netware v6.5 SP5 - CPR Release
NDPSM Version 3.01.17 Dec 10, 2005
HTTPSTK Version 4.01 May 1, 2006
"Thread Owned by NLM: HTTPSTK.NLM"
"The CPU encountered a problem executing code in NDPSM.NLM. The problem
may be in that module or in data passed to that module by a process owned

Couple questions - 1) any way to stop this ABEND? and 2) any way to ASK
the server (NOT derive...) the highest ordinal number on the server in
one, simple cmd or step (for example, I can find the number of PA's by
using cURL to view the page /PsmStatus and looking at the line after
"Number of Printer Agents" - the method listed in TID 10097674 to find the
ordinal number is too difficult to script)?


Matt Walkowiak