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

Hi,

 

I have a SAS program in my local machine to import data from an external source. I want to schedule the program to run after every 5 minutes. I have tried using SAS Management Console, but unsuccessful. So i have decided to schedule it in the sas server, which runs on UNIX environment. 

I have been said to create a execuatable of my program using the following command :
-> <path of SAS exe> -nodms <path of SAS Program on server> but all i got was "Command not found".

 

and after getting done schedule it using the corntab in UNIX server.

 

 

Please help me providing detail steps to do.

 

SAS Support Mumbai is unable to help, thats why i have turned to community for help.

 

Thnaks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

Once logged on to the commandline, enter

which sas

If that does not give you the absolute path to the SAS executable, then the directory of the SAS binary is not included in your PATH environment variable.

In this case, do this:

In SAS MC, open Server Manager, then your server context (most probably SASApp), then the Logical Workspace Server. Right-click on the Workspace Server beneath the Logical Workspace Server, and select Properties.

In Options, you will find the absolute path to the WorkspaceServer.sh shell script.

Go back to your commandline window.

One Step down in the path (eg /..../Lev1/SASApp) you will find a sas.sh shell script that can be used to start SAS in the same base context that your EG uses. In the Lev1 directory, you can find a file called level_env.sh that contains (among others) the definition of SASROOT and SAS_COMMAND, pointing to the SAS executable.

 

What did your <path of SAS exe> in the failed test look like?

View solution in original post

2 REPLIES 2
mnjtrana
Pyrite | Level 9

Crontab can be used to schedule jobs in Unix via Unix SAS. you can schedule in crontab without creating the executable as well. you can mention the physical path of your program to be run.

 

To access crontab login to Unix and type crontab -e (Edit mode). This is a VI Editor. Press Esc Key and I for insert. Press Esc Key and x to delete.

 

Syntax for crontab is

*    *    *    *    *  command to be executed

┬    ┬    ┬    ┬    ┬

│    │    │    │    │

│    │    │    │    │

│    │    │    │    └───── day of week (0 - 6) (Sunday=0 )

│    │    │    └────────── month (1 - 12)

│    │    └─────────────── day of month (1 - 31)

│    └──────────────────── hour (0 - 23)

└───────────────────────── min (0 - 59)

 

 

for example:

05 * * * 0-6 nohup  /SAS Installation Path/ /my progam/ss.sas

 

This would run the program every week day at after 5 mins .

 

 


Cheers from India!

Manjeet
Kurt_Bremser
Super User

Once logged on to the commandline, enter

which sas

If that does not give you the absolute path to the SAS executable, then the directory of the SAS binary is not included in your PATH environment variable.

In this case, do this:

In SAS MC, open Server Manager, then your server context (most probably SASApp), then the Logical Workspace Server. Right-click on the Workspace Server beneath the Logical Workspace Server, and select Properties.

In Options, you will find the absolute path to the WorkspaceServer.sh shell script.

Go back to your commandline window.

One Step down in the path (eg /..../Lev1/SASApp) you will find a sas.sh shell script that can be used to start SAS in the same base context that your EG uses. In the Lev1 directory, you can find a file called level_env.sh that contains (among others) the definition of SASROOT and SAS_COMMAND, pointing to the SAS executable.

 

What did your <path of SAS exe> in the failed test look like?

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1952 views
  • 1 like
  • 3 in conversation