I have a SAS program called Email.sas saved on a Unix server, the Unix server has AutoSys installed.
I have created a AutoSys job called Email_Check, which basically is required to start the SAS job "Email.sas".
I created a JIL with the following command:
update_job: 158774_Email.sas_job job_type: CMD
machine: <<server name>>
However the job keeps failing with permissions issue.
Can anyone advise on how to run SAS jobs via AutoSys?
What version of WAAE please?
When you say, failing with permission issue, is it on SAS side?
Does the /sas/departments/pjy/projects/falcon/Email.sas script use relational path (for example: echo date > tmp_file instead of echo date > /tmp/tmp_file)?
By default, the system agent 11.3 works from the it's location as the initial directory. It could be that the script is trying to create a file under the agent path (which is usually owned by root or autosys) and hence fails with permission denied.
Ensure the Agent's spool directory is world-writable with sticky bit on (drwxrwxrwt.), that is another potential reason job could fail when run as non-root/autosys users.
Thank you for your suggestions.
Our version of WAAE is 11.3.
I’m not sure if the failure is on the SAS end, the user ID has permissions.
The SAS script “Email.sas” simply has the following command within it:
FILENAME outmail EMAIL
SUBJECT="Testing Remote Email Send"
PUT "Good Morning,";
PUT " ";
PUT "This is an AutoSys test.";
PUT "Script is stored on Unix server:";
You say that “By default, the system agent 11.3 works from the its location as the initial directory”… where would that be? If I move my SAS script to that location I can test to see if it works.
I’m checking the write status with my colleagues.
One can't call a SAS program directly in any Scheduling Engine. You need to invoke the SAS command line, like so:
Try this for the AutoSys command:
<SASROOT>/sas -SYSIN /sas/departments/pjy/projects/falcon/Email.sas
Replace <SASROOT> with the absolute path of the sas command line.