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



You didn't say "programmatically" in your original message. To me, doing this programmatically would indicate a flaw in the software that you're killing that it doesn't know how to close it's own connections when it needs to. A real kludge.

But, it's certainly possible to do it. Just call the QtocLstNetCnn API to get the same listing that NETSTAT *CNN shows, then for each connection (You can code IF statements to filter the list) run the ENDTCPCNN command to end it.


On 5/13/2010 12:59 PM, James H. H. Lampert wrote:
Scott Klement wrote:
Type NETSTAT *CNN, place a 4 next to all of the connections you want to
kill, then press ENTER.

That's great for doing it interactively. We do it all the time. It would
be even better if WRKTCPSTS *CNN had subsetting-by-port as a
command-line parameter, rather than just as something you had to do from
a function key after you already had the display up.

What I need is a way to do the equivalent programmatically. Something
that I can have a CL program do, in order to clear out an indeterminate
number of client-server jobs on that port, so that the library used by
the server can be restored from a save file.

It's to be part of a system by which our testing czar (who's not
especially terminal-literate) can reset his testing environment without
anybody else having to step in and help him.

--
JHHL



As an Amazon Associate we earn from qualifying purchases.

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