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
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.