05-05-2014 03:49 AM
I need to run SAS jobs using UNIX environment.
So I have created a simple shell script and given
But I am getting the following error
sh: sas: not found.
Kindly help me to resolve this.
05-05-2014 04:53 AM
The error message simply means that the directory where SAS resides is not in your "search path".
The "search path" in UNIX is actually the environment variable PATH (case sensitive!), where the paths to be searched for executables are listed, separated by ":". The shell program (sh), which processes your commands, uses this.
You can display the PATH variable by entering "echo $PATH".
It usually looks quite like this:
The period at the end means to always search the current directory last, mimicking the default behaviour of DOS/Windows. Many installations will not have this, for security reasons.
You can avoid the problem by entering the absolute path to SAS, which starts with a "/" (this path therefore includes everything starting at the root directory of the operating system). You have to know exactly where SAS is installed to do this.
Another option is to have the system administrator include the path to SAS in the global definition of the PATH variable.