BookmarkSubscribeRSS Feed
jmartin-moreno
Fluorite | Level 6

I work at a community college and we are working on an outreach campaign to notify students of their absences and offering services in case they are struggling.  I know how to generate an email from SAS in a DATA step, but students respond better to texts than email. I know that I can send an email to SMS if I have the students' cell phone numbers and carriers. I have the numbers but not the carriers.  Does anyone know of a way to generate a text message from SAS if you do not have the cell phone service provider of the recipient?

 

The code I used to send an email to SMS using the phone number and carrier is included here:

/* SET UP EMAIL FOR STUDENTS - COMPLETION CENTER */

%macro rept(email,firstname,lastname,class1,class2,class3,DUAL,FGEN,SEP,SSS,HPRS,COMPLETION);


filename doemail email 'jmartin-moreno@mclennan.edu'
		from='jmartin-moreno@mclennan.edu'
		subject="Course Absences";

data _null_;
	file doemail

	to=("&email.")
	from=("jmartin-moreno@mclennan.edu")
	cc=("lwichman@mclennan.edu","jmartin-moreno@mclennan.edu")

	subject="OPTION #2--Course Absences";

	put "Hi &firstname. &lastname.,";
	put " ";
	put "You were marked absent at least once during the first 2 weeks of classes, 
so I wanted to check in. If you believe you're receiving this message in error, 
I encourage you to check in with each of your professors. Below are the classes 
in which you were marked absent.";
	put " ";
	put "--&class1.";
	put "--&class2.";
		put " ";
	put "In case there's something getting in the way of your school work, I also wanted 
to let you know about our office (the Completion Center) and how we might be able 
to help. The MCC Completion Center is staffed by a team of Success Coaches. 
If you're wondering what a Success Coach is, the short version is we help students 
connect to the strategies and resources they need to be successful. Sometimes that can 
be figuring out what motivates you, or sometimes that means helping you figure out, 
'where can I get access to a computer or internet?' Whatever challenges you're facing, 
we hope you'll lean on us to help you find solutions and have a successful semester.
You might be surprised how we can help!";
	put " ";
	put "Best,";
	put " ";
	put "Laura";
	put " ";
	put "Jeff Martin-Moreno";
	put "McLennan Community College";
	put "SSC 236 | Direct: 254.299.8466 ";

run;

%mend rept;




/*************** TESTING *****************/

data _null_;
   set TEST_FA20_STUDENTS_ABSENCES;
where SSS =1;
    
   call execute('%rept('||email||','||firstName||','||lastName||','||Class1||','||Class2||','||Class3||','||DUAL||','||FGEN||','||SEP||','||SSS||','||HPRS||','||COMPLETION||')');

run;

 

3 REPLIES 3
jmartin-moreno
Fluorite | Level 6
If there is not a way to do what I am asking in SAS, does anyone know of a good workaround outside of SAS?
Ksharp
Super User
No way. Ask for some software company or mobile provider or Google it .
jmartin-moreno
Fluorite | Level 6
I did Google it. I don't post here unless I have already Googled. I know there are paid software solutions. We use one for other texting campaigns. That may be what we have to do, but it would save a lot of time if I could find a solution that would work from SAS. I realize I may be asking something that is not possible, but I figured it can't hurt to ask.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 3 replies
  • 470 views
  • 1 like
  • 2 in conversation