Hi Kevin, thank you for your help. For the above example, how would one send an email to, say, each manager of the hospital_id and attach their respective file? I was able to PROC EXPORT based on hospital_id and am unsure how to approach the email code. Your expertise is appreciated!