BookmarkSubscribeRSS Feed
meckarthik
Quartz | Level 8

Hi There,

I've created some codes which run automatically when run command is pressed, but i need to be run only when certain conditions are met, otherwise should stop and close the SAS program (if possible).

eg. after 4 pm on Friday

 

Any help 

 

2 REPLIES 2
andreas_lds
Jade | Level 19

@meckarthik wrote:

Hi There,

I've created some codes which run automatically when run command is pressed, but i need to be run only when certain conditions are met, otherwise should stop and close the SAS program (if possible).

eg. after 4 pm on Friday

 

Any help 

 


Such tasks are handled by schedulers. Depending on the code you have, it could be possible to add some checks and terminate the sas process, but i can't recommend re-inventing the wheel.

PaigeMiller
Diamond | Level 26

Here is a possibility:

 

data _null_;
    if weekday(today())=6 and timepart(datetime())>'16:00't then endsas;
run;

 

--
Paige Miller