Hello,
A colleague is executing a sas program via a terminal window of winscp, on a unix server and it start well.
However, as the execution last at least 10 hours, the terminal window will closed after let's say few hours then causing the sas program to stop.
Is there a way to avoid that and if so how.
In my experience a shell terminal to a Linux OS can close after a time, either due to firewall timeout or (with us working from home) a temporary network disconnect.
The best approach is to run any long-running process asynchronously so it is not interrupted when the shell window disconnects. Use the & terminator on the command, which returns control immediately back to the shell. Example:
/usr/local/bin/sas mysasbatch.sas -log ./logs/mysasbatch.log &
When you return to find the shell disconnected, simple "shell in" again and check the contents of the SAS log.
In my experience a shell terminal to a Linux OS can close after a time, either due to firewall timeout or (with us working from home) a temporary network disconnect.
The best approach is to run any long-running process asynchronously so it is not interrupted when the shell window disconnects. Use the & terminator on the command, which returns control immediately back to the shell. Example:
/usr/local/bin/sas mysasbatch.sas -log ./logs/mysasbatch.log &
When you return to find the shell disconnected, simple "shell in" again and check the contents of the SAS log.
Hello,
I am glad to see that your are using almost the same command as we are usually do.
Most of the time, we usually use a command like this one:
nohup path/sasprogram.sas &
and normally we don't have any issue. As we have received the question on our internal sas forum,
I did not have a chance to talk to that person due to time zone.
Thanks a lot for your advise.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.