From: Michael Raithel on
Dear SAS-L-ers,

Alex S posted the following:

> Hi All,� � � � � � I want to run a batch SAS code in
> UNIX platform. I am giving the following command to run it. “nohup sas
> myprogram.sas &” it run fine if don't close my telnet/putty window. If
> I exist
> the UNIX environment then my program gets terminates, in the log it
> says the
> ERROR message “user asked for termination”
>
> What I want is… my program should run if I close my system.Could you
> help me on this, please?
>
Alex, WOW; that is a kick in the hup for sure!

You seem to be doing everything right in what you described, above. The form of the NOHUP ("no hangup") UNIX command is: nohup command &, which specifies that any output from "command" that would normally go to the terminal get put in a file named "nohup.out" in the current directory. As you know, this command is designed so that harried programmers can submit a long-running SAS program on a UNIX server and then head out to return that overdue library book, pick up dress pants at the cleaners, get the car through the car wash, pick up a half-gallon of milk and some bread, grab a tall Starbucks dark roast with extra cream, and chat with a colleague in the parking lot on the way back in, instead of doing useless things like corporate paper work. The NOHUP
command works in 99 and 44/100ths of the cases... but not yours...

Okay, so let's do some diagnosis work, here, and see if we can get you hupping. Try the following:

1. Make sure that when you are executing your code, above, you are in a directory that you have update permissions to. That is, make sure that you can create and update files--files such as nohup.out--in the directory you are executing your SAS program from. If you don't have the proper update permissions, then PERHAPS SAS is terminated because UNIX knows you can't successfully invoke NOHUP.

2. Delete the nohup.out file and try resubmitting/logging out again. Did that work?

3. Execute some other UNIX command with NONHUP and & and quickly log out. Log back in again and take a look at nohup.out. Did that non-SAS command execute correctly and write to nohup.out? Hmmm....

If these explorations do not get you anywhere, then I believe your issue is likely related to your "telnet/putty window" environment and its configuration. However, I can't help you there at all--the last time I used putty it was to fix that crack beneath the back-yard facing basement window. I was able to successfully dodge the draft(s)!

Alex, best of luck in all of your SAS endeavors!


I hope that this suggestion proves helpful now, and in the future!

Of course, all of these opinions and insights are my own, and do not reflect those of my organization or my associates. All SAS code and/or methodologies specified in this posting are for illustrative purposes only and no warranty is stated or implied as to their accuracy or applicability. People deciding to use information in this posting do so at their own risk.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Michael A. Raithel
"The man who wrote the book on performance"
E-mail: MichaelRaithel(a)westat.com

Author: Tuning SAS Applications in the MVS Environment

Author: Tuning SAS Applications in the OS/390 and z/OS Environments, Second Edition
http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&pc=58172

Author: The Complete Guide to SAS Indexes
http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&pc=60409

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Everywhere is within walking distance if you have the time. - Steven Wright
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++