Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

batch command to end connection with iSeries server

Posted on 2012-04-10
7
Medium Priority
?
571 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

In this article, I’ll show how research, determination, and use of modern technology helped me solve a DNA mystery.
The core idea of this article is to make you acquainted with the best way in which you can export Exchange mailbox to PST format.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

705 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