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

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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
  • 1127 views
  • 0 likes
  • 1 in conversation