BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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.
6 REPLIES 6
Patrick
Opal | Level 21
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
deleted_user
Not applicable
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.
Patrick
Opal | Level 21
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
deleted_user
Not applicable
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.
Patrick
Opal | Level 21
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
deleted_user
Not applicable
Yes, you're right. I'll use a sleep script and instead focus on my work 😉

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 1548 views
  • 0 likes
  • 2 in conversation