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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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