BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
StaticFX
Obsidian | Level 7

This is stumping me..

I have code that creates and sends an email to 7 people

When I run it in SAS EG - it works fine.

When I have a cron run it with a ksh it doesnt.

the ksh will work if I send to only 2 people + one cc, but no more?

This is not making sense

 

FILENAME mail EMAIL TO=("name@place.com" "name2@place" "3" etc) CC=("Othername@place") SUBJECT="blah" CONTENT_TYPE="text/html" ATTACH="filename.csv";

Why would it not work with ksh?

1 ACCEPTED SOLUTION

Accepted Solutions
StaticFX
Obsidian | Level 7

Well, never mind. I have found the issue - so I am replying to let others know.

There is a line length limit when running SAS in a ksh..

 

It must have to do with the " " or ( ) in the line.. but at 255 chars it cuts off the rest of the statement.

 

Solution is just to add some new lines in it. 

 

 

 

View solution in original post

3 REPLIES 3
StaticFX
Obsidian | Level 7

Well, never mind. I have found the issue - so I am replying to let others know.

There is a line length limit when running SAS in a ksh..

 

It must have to do with the " " or ( ) in the line.. but at 255 chars it cuts off the rest of the statement.

 

Solution is just to add some new lines in it. 

 

 

 

Kurt_Bremser
Super User

See this:

FILENAME mail EMAIL
  TO=("name@place.com" "name2@place" "3" etc)
  CC=("Othername@place")
  SUBJECT="blah"
  CONTENT_TYPE="text/html"
  ATTACH="filename.csv"
;

If I have a lot of recipients, and I keep them in a macro variable, I do this:

%let rec=rec1@domain.com;
%let rec=&rec rec2@domain.com;

and so on.

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
  • 3 replies
  • 518 views
  • 1 like
  • 2 in conversation