Hi Friends, i developed below process and just want to make sure have correct logic in place.
Goal here is to make sure empty touch file got out ONLY WHEN previous process gets completed and "full/complete" file is available
step1:
/*different sas process runs and end of the process one large .dat file out there on sas server */
step2:
/*logic which create touch file only once large .dat file is done writing and fully available*/
%let datfile="/dir-where-dat-file-is/test.dat
%if %sysfunc(fileexist(&datfile)) %then
%do;
data _null_;
infile "cd /dir-where-touch-file-needs-to-go; touch MarketingDataFileReady.txt;" pipe;
run;
Seems correct. Other questions:
1. Do you remove the .dat file after your touch file is created? It's possible that you may look at the same .dat file multiple times if you don't check timestamps or move the file out.
2. Do you have another process that deletes the touch file later? Same potential issues as question #1.
Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF
View now: on-demand content for SAS users
Thanks.
1. Do you remove the .dat file after your touch file is created? No. this will be replaced/overwritten by my same process next day (process runs on daily bases) It's possible that you may look at the same .dat file multiple times if you don't check timestamps or move the file out.
2. Do you have another process that deletes the touch file later? No, this will be replaced/overwritten as well. i am assuming Same potential issues as question #1.
- another technology (non-sas) will pickup touch file
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.