Help using Base SAS procedures

Keep a connected SAS instance running

Reply
N/A
Posts: 0

Keep a connected SAS instance running

Hi,

Run SAS on mainframe but get disconnected automatically if a program hasn't been submitted for the last 30 minutes. Would like to find a way to always stay connected. Something like a small script that could determine whether a SAS program is running now, if not run some arbitrary code in order to be connected.
Respected Advisor
Posts: 4,173

Re: Keep a connected SAS instance running

Posted in reply to deleted_user
Hi
I would contact the person who is responsible for the SAS installation in your organisation.

It's often a problem that a user's SAS EG session (yours for example) stays alive for days eventually locking datasets which have to get updated overnight.

There must be some customised process implemented on the mainframe side which terminates EG sessions which are not active for more than 30 minutes. May be you can convince the person responsible to increase this time (at least during working hours).

Is your problem only convenience (you have to re-connect) or is it that long running jobs get canceled? If the latter is the case then you sure have a good reason to ask for a change of how and when idle sessions are killed.

HTH
Patrick
N/A
Posts: 0

Re: Keep a connected SAS instance running

Thanks Patrick,

Sure, contacting responsible IT staff would be great if they weren't slow to changes. For me, it is just a matter of convenience, not have to re-run big tasks. Isn't there a function that could found out if SAS is currently processing a script? If there is, it would be nice to have this small script run every half an hour.
Respected Advisor
Posts: 4,173

Re: Keep a connected SAS instance running

Posted in reply to deleted_user
Hi

I think you have very valid reasons to request for a change in how and when idle EG sessions are terminated.

I can't think of a solution which you as a user could implement to "trick the system".

A workaround could be: Whenever you leave your workstation for more than 30 minutes you start the following task in EG - and you stop the task when you come back.
As I understand what's going on this should keep your session alive because you keep the workspace server busy.

data _null_;
do i=1 to 16;
rc=sleep(1,1700);
end;
run;

HTH
Patrick
N/A
Posts: 0

Re: Keep a connected SAS instance running

Thanks,

Sleep function will be very helpful, but there's a problem in processing more than one program in the same session. I want the sleep script to behave like a daemon process, executing only when nothing else is executing.
Respected Advisor
Posts: 4,173

Re: Keep a connected SAS instance running

Posted in reply to deleted_user
I think it would be very hard to develop what you ask for - and even if possible you would most likely not have the appropriate priviledges to implement it.

An approach could be to develop a add-in for EG which does what you want (check for started task every x minutes - and if there's non run a tiny little program on the server).

I know that the work-around I proposed is not very handy - but it's right now the best I can come up with.

I think that you have to request a change from your IT department and explain them what it means for you to loose every 30 minutes the connection (and therefore all your work datasets and results).

HTH
Patrick
N/A
Posts: 0

Re: Keep a connected SAS instance running

Yes, you're right. I'll use a sleep script and instead focus on my work Smiley Wink
Ask a Question
Discussion stats
  • 6 replies
  • 135 views
  • 0 likes
  • 2 in conversation