@alexal thank for answering. Unfortunately i never used ssh script! It's not so easy for me understanding the script and i don't have much time to better understand the code. I need to know where to schedule the time to autoload and where to specify the path to the sas script i wrote for loading the table. here are the script Schedule.sh, runsas.sh and the autoload.sas program. Can you please add comments where i need to change the information! Thank you so much!!! #!/bin/bash # # schedule.sh # # syslog Schedule AutoLoad.sas # RUNSAS_PATH="/sas/config/Lev1/Applications/SASVisualAnalytics/VisualAnalyticsAdministrator/runsas.sh" TIME_INTERVAL_MINUTES=15 #call to runsas.sh cat <(fgrep -i -v $RUNSAS_PATH <(crontab -l)) <(echo "*/$TIME_INTERVAL_MINUTES * * * * $RUNSAS_PATH > /dev/null ") | crontab - cat -> to look through a file, the quickest way to get all the contents on your screen --------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------- #!/bin/bash # # runsas.sh # # syslog Run AutoLoad.sas # # Source level_env . /sas/config/Lev1/level_env.sh SERVER_CONTEXT=SASApp APPSERVER_ROOT=$LEVEL_ROOT/$SERVER_CONTEXT AUTOLOAD_ROOT=/sas/config/Lev1/Applications/SASVisualAnalytics/VisualAnalyticsAdministrator FILENAME="$AUTOLOAD_ROOT/AutoLoad.sas" LOG_FILE="$AUTOLOAD_ROOT/Logs/AutoLoad_#Y.#m.#d_#H.#M.#s.log" LST_FILE="$AUTOLOAD_ROOT/Logs/AutoLoad.lst" PID_FILE=$AUTOLOAD_ROOT/autoload.pid CFG_FILE="$AUTOLOAD_ROOT/AutoLoad.cfg" MOD_FILE="$AUTOLOAD_ROOT/AutoLoad_usermods.cfg" # Set config file path export SASCFGPATH="$APPSERVER_ROOT/sasv9.cfg, $APPSERVER_ROOT/sasv9_usermods.cfg, $CFG_FILE, $MOD_FILE" # Function to run the autoload.sas program and save the pid fnRunSAS() { cd $APPSERVER_ROOT $SAS_COMMAND -sysin $FILENAME -log $LOG_FILE -print $LST_FILE -batch -noterminal -logparm "rollover=session" & echo $! > $PID_FILE } # Ensure process listed in autoload.pid is not running if [ -f $PID_FILE ]; then kill -0 $(< $PID_FILE) > /dev/null 2>&1 if [ $? -eq 0 ]; then echo "autoload still running (pid $(< $PID_FILE))" exit 1 else fnRunSAS fi else fnRunSAS fi exit 0 --------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------- /* * AutoLoad * * Purpose: Synchronizes SAS data sets placed in a single disk location with * a single LASR Analytic Server library defined in metadata. * */ /* Set the name of the LASR library to which to Auto Load */ %LET AL_META_LASRLIB=Visual Analytics Public LASR; /* Include and execute main AutoLoad functionality */ %LET INCLUDELOC=/sas/sashome/SASVisualAnalyticsHighPerformanceConfiguration/7.3/Config/Deployment/Code/AutoLoad/include; /* ------- No edits necessary below this line -------- */ filename inclib "&INCLUDELOC."; %include inclib ( AutoLoadMain.sas ); %AutoLoadMain;
... View more