BookmarkSubscribeRSS Feed
sampsas
Fluorite | Level 6

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;

 

 

 

 

2 REPLIES 2
noling
SAS Employee

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

sampsas
Fluorite | Level 6

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 

 

SAS Innovate 2025: Call for Content

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!

Submit your idea!

How to Concatenate Values

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.

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
  • 2 replies
  • 510 views
  • 0 likes
  • 2 in conversation