BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
santosh_pat69
Quartz | Level 8

Hi All,

 

I am trying to Send emails to a group after the files are available for  each department.

 

for example :

Group:- Admins

Department : Sales,Finance, Planning

 

Here Admins is the group which will monitor the extracts from the below three departments, now i am sending three different emails

after the data is extracted from each dept, now the group has requested to send the extract details on a single email.

 

I have tried to create a Macro variable using fileexists as the extract is output to a csv file at a particular location.

%let fldir2="A52091/Admins/Reports/Sales_yymmddhhmmss.csv";

%macro Inp;

%if %sysfunc(fileexist(&fldir2.)) %then

%do;

   %let Sales_Fle=Y;

   %put "The SALES Extract is available";

%end;

%else %do;

   %let Sales_Fle=N;

   %put "The SALES Extract is available";

%end;

%mend Inp;

%inp;

 

Similarly i am creating macro variables for Finance and Planning departments.

Please guide me on how to send the availablity of the Extracts on a Single email.

 

The extract is usually complete by 7.30 AM Mon - Fri excluding Public holidays.

As mentioned the group is currently reciveing 3 emails and have requested to send the availablity on a Single email.

 

Kindly suggest.

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
santosh_pat69
Quartz | Level 8

Hi All,

 

I have found a way to do this, i have checked for the existence of the file and have created the macro variables as shown in my below post. and have created a datasetset to read the status of the existence of the file and send the email using ODS/ or export the dataset to external file and send it as an attachement.

 

 

Thanks....

 

 

View solution in original post

1 REPLY 1
santosh_pat69
Quartz | Level 8

Hi All,

 

I have found a way to do this, i have checked for the existence of the file and have created the macro variables as shown in my below post. and have created a datasetset to read the status of the existence of the file and send the email using ODS/ or export the dataset to external file and send it as an attachement.

 

 

Thanks....

 

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1150 views
  • 0 likes
  • 1 in conversation