BookmarkSubscribeRSS Feed
sasikala
Obsidian | Level 7

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

 

 

 

7 REPLIES 7
Quentin
Super User

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?

BASUG is hosting free webinars Next up: Mike Raithel presenting on validating data files on Wednesday July 17. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
sasikala
Obsidian | Level 7

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

 

 

SASKiwi
PROC Star

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.

sasikala
Obsidian | Level 7

Thanks! This helps lot

sasikala
Obsidian | Level 7

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

 

Kurt_Bremser
Super User

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.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 911 views
  • 4 likes
  • 4 in conversation