Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

batch command to end connection with iSeries server

Posted on 2012-04-10
7
Medium Priority
?
575 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:Dave Ford
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 1000 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
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
LVL 16

Assisted Solution

by:theo kouwenhoven
theo kouwenhoven earned 1000 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

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

Question has a verified solution.

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

In this post, I will showcase the steps for how to create groups in Office 365. Office 365 groups allow for ease of flexibility and collaboration between staff members.
Aerodynamic noise is the cause of the majority of the noise produced by helicopters. The inordinate amount of noise helicopters produce is a major problem in the both a military and civilian setting. To remedy this problem the use of an aerogel coat…
Integration Management Part 2
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

926 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