Solved

batch command to end connection with iSeries server

Posted on 2012-04-10
7
547 Views
Last Modified: 2012-06-21
I'm looking for a command that I can execute on the pc that will end a running Client accessing connection.  I want to perform some software maintenance on the pc and want to ensure that all applications are ended before I do anything to the pc.

I seem to recall, that at one time, there was a CWB command, of some sort, that did the trick.

But I could be mistaken.

Thanks in advance for all replies.
0
Comment
7 Comments
 
LVL 18

Expert Comment

by:daveslash
ID: 37828462
I don't know of any CWB command to do this, but whenever I want to accomplish the same thing, I simply re-boot the PC. It works every time, and it's not that complex.

HTH,
DaveSlash
0
 
LVL 1
ID: 37828483
Thanks Dave.

That DOES work.
And so does logging off and back on.

But neither are an option for me.

Any other idea would be greatly appreciated if you think of anything.

Ray in Wisconsin
0
 
LVL 5

Accepted Solution

by:
stevebowdoin earned 250 total points
ID: 37831070
I just read the online user guide for 7.1.

I did not find any commands of any name to do that.

Sorry
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 16

Assisted Solution

by:theo kouwenhoven
theo kouwenhoven earned 250 total points
ID: 37831550
Did you try the Windows option taskkill

To kill a process by ID  use : taskkill /pid 3192

or by processname : taskkill /im pcscm.exe /f
(/f is to force the killing)

Other parms see here

Regards,
Murph
0
 
LVL 1

Author Closing Comment

by:Accidental Hyper-V Administrator
ID: 37832555
Thanks to the both of you for your efforts on my behalf.

Since there doesn’t appear to be a way to "force" the ending of all iSeries connectivity (from the pc), I decided to include some code in my software update script that, when run, will start the process, by logging off the currently logged on user.
I've tested this.
And if I “had” a connection to the iSeries server before logging off, forcing a log off, successfully ends that connection.

I'm logging into the remote PCs, via the Local System Account to "do" my "VooDoo".

Logging off the currently log on user (It’s gonna run (my script) at 2:00 am, so it shouldn’t be an issue for any user.

So methinks, I'm good.

Thanks once again to the both of you, for your time.
I hope to be able to repay your kindness somewhere down the road.

Ray in Wisconsin
0
 
LVL 16

Expert Comment

by:theo kouwenhoven
ID: 37833753
Hey Ray,

"Since there doesn’t appear to be a way to "force" the ending of all iSeries connectivity (from the pc)"

You probably didnt read or understood the parameters in the taskkill command,

You can build a filter to kill the programs,

so: taskkill /fi "IMAGENAME eq pcs*.exe" /f will kill the CA processes.
If you don't trust the wildcard, you put 2 kill commands in a .bat file:

taskkill /im pcscm.exe" /f
taskkill /im pcsws.exe" /f

There are more processes but you don't want to kill them, e.g. rtopcb.exe  this is datatransfer, and killing that will be bad for tou data integrity
0
 
LVL 27

Expert Comment

by:tliotta
ID: 37874114
AFAIK, the only potential way to close all such connections is to capture every connection via a netstat-like utility and work backwards to the controlling processes when the remote address is seen to match. Connections are not limited to those that iSeries Access might create, which would be the only ones that a CWB function will find.

Tom
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

One of the biggest threats in the cyber realm pertains to advanced persistent threats (APTs). This paper is a compare and contrast of Russian and Chinese APT's.
Knowing where your website is hosted is as important as the features you receive, the monthly fee, and the support you receive. Due diligence should be done when choosing your next hosting provider.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question