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.
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.
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.
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.
do i=1 to 16;
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.