BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
alepage
Barite | Level 11

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

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.

Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.

View solution in original post

2 REPLIES 2
ChrisHemedinger
Community Manager

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.

Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.
alepage
Barite | Level 11

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.

SAS Innovate 2025: Call for Content

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!

Submit your idea!

SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 980 views
  • 0 likes
  • 2 in conversation