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.

Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!

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.

Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!
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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 716 views
  • 0 likes
  • 2 in conversation