Hi Experts,
I need to keep sas session alive for all time and in some time frequency (Call sleep()) call macro and execute it.
I am thinking to schedule the SAS script in unix nohup and clear sas tmp space frequently part sas script.
Could you please let me know if there any disadvantage of keeping SAS session alive for all time by nohup.
Thanks,
Sasikala.k
Why keep it alive forever (while sleeping between calls)? Wouldn't it be better (use less resources) to just program it as a batch job that runs once, and then schedule the job to run with whatever frequency you want?
Thanks for the update.
My requirement is , need to check the DB table entry, in case new record inserted by other job, need to fetch that record immediately and execute the SAS job load the data into DB.
My sas job should be running independently to check entry in DB table .. if new entry present , It should load data immediately
Thanks,
Sasi.k
How frequently do you wish to run this process? Every minute, every 5 minutes, every 10 minutes? For example if you run it every minute that is 1,440 times each day. That means if you schedule a "single-pass" SAS job to do this you will end up with 1,440 SAS log files to manage per day.
I suggest perhaps scheduling this application to run daily starting at midnight (or another time to suit your preference) and looping at the required frequency for 24 hours. That way SAS log management is a lot easier (one log file per day) and job reliability is unlikely to be compromised.
Thanks! This helps lot
How is that new record inserted in the DB? If it is from a scheduled job, use the same scheduling to start the SAS update immediately after.
Hi KurtBremser,
The DB records will be inserted by other process and I don't have control to update or modify it to schedule my job along with it.so my job should run independently, if some new entry is present in the DB table, need to fetch it and invoke the data load process.
Thanks,
Sasi.K
On UNIX, you have cron at your disposal. Use that.
A SAS session can crash for a lot of reasons (or simply be terminated by a system reboot). A crontab entry is there and will stay there.
With separate batch SAS sessions, there's no need to clean out WORK.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.