BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,
programs to check datasets that they have been updatedto day .Then check the contents of the datasets for data from yesterday.

if condition false then the program should check again in 30 min. if true then run all programs.

This process basically to shedules the job in batch

thanks,
chandra
4 REPLIES 4
Olivier
Pyrite | Level 9
Hi Chandra.
For information on dataset creation / last modification date, check the Contents procedure, or the SASHELP.VTABLE view.
For comparing datasets, use the Compare procedure.
To make SAS wait, you can use the SLEEP function within a Data step.
For conditionnal executing of SAS programs, see what you can do with macro language.
Regards;
Olivier
deleted_user
Not applicable
Hi Oliver,

THANKS FOR REPLAY . COULD YOU PLEASE SEND ME IF U HAVE ANY SAMPLE CODE FOR THAT


THANKS,
CHANDRA.
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
The SAS support website http://support.sas.com is chock full of code samples and SAS documentation, which can be amazingly helpful with learning the SAS language to hone one's skills.

Another option is to use GOOGLE.COM or another search engine to search the SAS.COM site for code snippets and SAS User Group SUGI/SGF technical papers on these and other SAS programming topics.

Lastly, the SAS-L list archives are also a wealth of information for your benefit and ever-increasing knowledge opportunity.

Scott Barry
SBBWorks, Inc.

http://support.sas.com/
LinusH
Tourmaline | Level 20
Hi,
here is some sample (untested!) code you can start with. Have a look in doc for PROC COMPARE and SYSINFO for details.
About the rechecking, I suggest that you use a scheduling tool for that, such as cron in UNIX.

Regards,
Linus


%macro checkdata;

data _null_;
dsid = open('libname.table');
updated_dt = attrn(dsid, 'MODTE');
if "&SYSDATE9"D eq datepart(updated_dt) the call symput('UPDATED','Y');
else call symput('UPDATED','N');
run;

%if &UPDATED eq Y %then %do;

proc compare data=lib.today compare=lib.yesterday;
...;
run;

%if &SYSINFO ne 0 %then %do;
%include "program.sas";
%end;

%end;

%mend checkdata;

%checkdata;
Data never sleeps

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 4 replies
  • 649 views
  • 0 likes
  • 4 in conversation