- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Why didn't you use scheduler (e.g. crontab in Linux) to execute your code ex. every 5 minutes and check for flag update?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Please, provide the code of your loop.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Easy, but what environment are you working in? EG, DMS, DIS?
Tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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).