BookmarkSubscribeRSS Feed
shlomiohana
Obsidian | Level 7

Hello,


I have the following final table (every day the table contents change):

DateBank_IDBranch_IDAccount_NumberCredit_CardCredit_Card_GroupID_numberMail_To
01/10/202020112345672234pix4432252pix@gmail.com
01/10/20202011232243343424pix2552367pix@gmail.com
01/10/202020112345675677lum4432252lum@gmail.com
01/10/2020203423445234545lum3656890lum@gmail.com
01/10/202020112345674299pix4432252pix@gmail.com

 

I would like to send an email to each record in the table that the combination of the fields is an Account_Number and a Credit_Card_Group is different.

According to the example, I will send 4 emails.

 

The Email:

From: freetalk@gmail.com

To: <Mail_To>

Subject: Closing <Account_Number> - <Branch_ID>

Email content:

<Credit_Card_Group> , <Date>

Cancel any instructions in the account <Account_Number> - <Branch_ID> -<Bank_ID>

credit cards-

1.<Credit_Card> - <ID_number>

2. <Credit_Card> - <ID_number>

Thanks.

 

Example of an email from the table:

From: freetalk@gmail.com

To: pix@gmail.com

Subject: Closing 1234567 - 1

Email content:

pix, 01/10/2020

Cancel any instructions in the account 1234567 - 1 - 20

credit cards-

1.2234 - 1234567

2.4299 - 1234567

Thanks.

 

I would appreciate your help.

3 REPLIES 3
shlomiohana
Obsidian | Level 7

UP

SASKiwi
PROC Star

@shlomiohana - To get a better response I suggest you post what you have tried so far. Many contributors like to see an attempt before they reply.

andreas_lds
Jade | Level 19

Please provide data in usable form, if you want to see working code.

Hints: sort the data by Mail_To an Account_Number, then use by-group-processing in a data-step.

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
  • 3 replies
  • 1079 views
  • 0 likes
  • 3 in conversation