Cancel SAS Remote server process - sas

Using SAS 9.4, what's the best way to (or is it possible to) cancel a submitted statement that you have used rsubmit to submit to a remote server? I have tried the usual click "Break" > "Cancel Submitted Statements" but to no avail.
Thanks

You need to select the "CONNECT" options when you select your "!" button. This will give you an option to cancel remote submissions.

To the best of my knowledge, there is no straightforward way of doing what you want. The remote server session will not respond to any further input from your local session until it has finished processing. All you can do is abandon the connection or kill the remote SAS process.
If this is happening to you frequently, I suggest you focus on making your remote sessions abort at the first sign of any trouble, e.g. by setting option errorabend, or have your remote code regularly check for the presence of a 'canary' file that you can delete if you want to regain control.
To avoid having to get your server admins involved every time this happens, perhaps you could also set up a script as part of the remote server autoexec.sas file to kill all orphan processes running in your name each time you connect to a new remote session.

Related

'Reload' or 'Reconnect' in Cloud Shell Editor - Is there a difference?

I have noticed that when I return to Google Cloud Shell Editor after some time, I see the following two options to re-establish my connection:
The Editor gives the option to Reload
The Terminal gives the option to Reconnect
What is the difference between these Reload and Reconnect ? Both buttons seem to re-establish a connection with both the Editor and the Terminal, so what is the reason for the different terminology?
There's the basic difference as when we opt to RELOAD, it'll refresh the whole session of the terminal. There you lose unsaved data where it can be a file you're editing or any changes you made in configuration before you lost without saving.
And on other hand, if you use RECONNECT it'll try to continue with the same point where you lost your connection. The session will try to reconnect and make you continue with the same point you stopped

Custom Event Listener in C++

In a command line application which is single threaded, I want to know when user closes (by clicking on red cross on top right) shutdowns PC or Logoff without logging out of my application first, so that I can clear the cookies that I am storing in window's registry.
Is there any way I can know when user has done the events mentioned above and call a function within my application or call a separate EXE or a Batch file following the event ?
I need this functionality because I want to prevent a possible scenario where in Registry is full of unwanted thrash created by not logging out of application properly.
Since my application runs over command prompt likeC:\Users\admin\Desktop>Application.exe -task "ConnectServer" --ip 127.0.0.1 I am looking out for some way to either manage cookies in efficient way or to delete the cookies after catching the events mentioned above.
You could use SetConsoleCtrlHandler()

How to Stop A ColdFusion MX-7 Scheduled Task that has already started

I inherited a coldfusion MX7 application that has a long running process, which the user kicked by accident.
By my calculations, at the current rate, the job will run for 3 days.
There doesnt seem to be a way through the administrator interface to stop a job that is running.
The table that is being filled can be easily repopulated, so I would think stopping the coldfusion service wont effect anything except the table, which isnt a problem.
Am I right? Is that safe? Is there another way?
a one-time restart of the service should be fine. for the future, you may want to add a required url param or other such safety mechanism to keep this long process from accidentally going off.
Check to see if the task already has an explicit timeout out set
Explicit Timeout
Otherwise the default page time out is used
Server Settings
For newer versions of ColdFusion 8 and above, you can kill a running page with with the Server Monitor in the section labeled "Aborting unresponsive or troublesome requests/threads"
Using server monitor.
It also may be possible to stop the processing by killing the SQL Server Task:
Is there a task manager of sorts for SQL Server 2008 and on?

App started by logged off XP user can seen on desktop of a different user

This is a coding question. Please read it before you flag it as belonging on ServerFault as the last one I wrote got thrown over there in less than 5 minutes.
I'm testing my win32/c++ application on XP which has the latest service packs. It contains two administrative user accounts both without passwords. I log in as User1 and start my app. The app runs, its main window appears and all is well with the world. I then log User1 off without first closing my app. Yes, I used "log off" not "switch user"
I then log in as User2 and my application is still running. I see it on the User 2 desktop, and I can even interact with it. It appears to be functioning normally. And task manager shows it running as User1.
Any ideas which might be going on here? Other applications (like notepad) don't exhibit this issue, yet mine does. Seems to me I'm doing something wrong in my code, but it really is a rather standard win32/c++ app. Perhaps I'm not processing some shutdown message properly? I'm sorry I can't give more specifics right now. I'm really hoping for some clue to spark further research.
Check windows task manager's for 2 things:
"Session ID" column
"User Name" column
If either of these columns do not show up then select them from View -> Select columns.
Check which username and session your application that is staying open with is on. Then go and start notepad.exe and compare to the session ID and User Name that it is started with.
When you do a logoff it will close the applications running under your Session ID and username.
I'm guessing that your application is running in it's own session ID and/or username.
When you login with the other user it checks to see if it can re-use a session that is already started for the new username. So that is why you will see it running again when you login with the second user.
Are you sure your application isn't running as a service? A service with "Interact with Desktop" could look like this.
UPDATE:
It must be somehow related to a service. A normal application, running in a session will be forced to close by Windows before the logoff is complete. Even if you don't handle the end session messages, Windows will tell the user about the nonresponding process and/or just kill it.
Do you need to be listening for a shutdown or logoff events?
Check out this answer for a similar question.
That answer refers to listening for WM_QUERYENDSESSION.
See WM_QUERYENDSESSION Message

Target IIS Worker Processes on Request

Ok, strange setup, strange question. We've got a Client and an Admin web application for our SaaS app, running on asp.net-2.0/iis-6. The Admin application can change options displayed on the Client application. When those options are saved in the Admin we call a Webservice on the Client, from the Admin, to flush our cache of the options for that specific account.
Recently we started giving our Client application >1 Worker Processes, thus causing the cache of options to only be cleared on 1 of the currently running Worker Processes.
So, I obviously have other avenues of fixing this problem (however input is appreciated), but my question is: is there any way to target/iterate through each Worker Processes via a web request?
I'm making some assumptions here for this answer....
I'm assuming the client app is using one of the .NET caching classes to store your application's options?
When you say 'flush' do you mean flush them back to a configuration file or db table?
Because the cache objects and data won't be shared between processes you need a mechanism to signal to the code running on the other worker process that it needs to re-read it's options into its cache or force the process to restart (which is not exactly convenient and most likely undesirable).
If you don't have access to the client source to modify to either watch the options config file or DB table (say using a SqlCacheDependency) I think you're kinda stuck with this behaviour.
I have full access to admin and client, by cache, I mean .net's Cache object. By flush I mean removing the item from the Cache object.
I'm aware that both worker processes don't share the cache data. That's sort of my conundrum)
The system is the way it is to remove the need to hit sql every new-session that comes in. So I'm trying to find a solution that can just tell each worker process that the cache needs to be cleared w/o getting sql involved.