SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

Continuous Processing of Node

Reply
Contributor
Posts: 52

Continuous Processing of Node

Hi All,

 

I need an idea on how to proceed this.  I want to run a node (mostly it would be a user written node) till I get value updated from another table.

 

E.g. 

 

Code 1 /SQL Join transformation : 

Proc sql;

select user_name,user_id,email_address,lot_name,completed_flag,process_date from user_table where completed_flag=1 and process_date="&sysdate."d;

quit;

 

Code 2 : 

Send an email to user_name and email_address from Code1 ;

 

 

Now my requirement is to keep on checking for Code1 for entire day and the moment I get completed_flag's value as 1 , I need to send email to the  users.  In short, I need infinite while loop for Code1 till the day is completed. 

 

Any help/idea is appreciated

 

Contributor
Posts: 32

Re: Continuous Processing of Node

Posted in reply to yashpande
Hello!

Why didn't you use scheduler (e.g. crontab in Linux) to execute your code ex. every 5 minutes and check for flag update?
Contributor
Posts: 52

Re: Continuous Processing of Node

Posted in reply to DmitryErshov
Yes ultimately we are going to use LSF. But thats not the question. We need only 1 instance of execution and not rerun. In short only 1 infinite while loop and the moment flag value is 1 I need to break from the loop. Somehow I am not getting it.
Contributor
Posts: 32

Re: Continuous Processing of Node

Posted in reply to yashpande

Please, provide the code of your loop.

PROC Star
Posts: 1,286

Re: Continuous Processing of Node

Posted in reply to yashpande

Easy, but what environment are you working in? EG, DMS, DIS?

 

Tom

Respected Advisor
Posts: 4,665

Re: Continuous Processing of Node

Posted in reply to yashpande

@yashpande

As already mentioned that's something which should be done via scheduling. But to answer your question: You can use CALL SLEEP() or the SLEEP() function to pause a process for a defined amount of time. Just use this within your loop until the condition becames TRUE. 

Once TRUE just jump out of the loop (using LEAVE).

Ask a Question
Discussion stats
  • 5 replies
  • 173 views
  • 0 likes
  • 4 in conversation