Solved

batch command to end connection with iSeries server

Posted on 2012-04-10
7
542 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
Comment Utility
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

Author Comment

by:Accidental Hyper-V Administrator
Comment Utility
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
Comment Utility
I just read the online user guide for 7.1.

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

Sorry
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 16

Assisted Solution

by:theo kouwenhoven
theo kouwenhoven earned 250 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
Veeam Backup & Replication has added a new integration – Veeam Backup for Microsoft Office 365.  In this blog, we will discuss how you can benefit from Office 365 email backup with the Veeam’s new product and try to shed some light on the needs and …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

763 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now