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....

 

 

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