mail TO limit? works ksh doesnt work, manual does?

Accepted Solution Solved
Reply
Contributor
Posts: 27
Accepted Solution

mail TO limit? works ksh doesnt work, manual does?

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?


Accepted Solutions
Solution
‎04-06-2018 01:04 PM
Contributor
Posts: 27

Re: mail TO limit? works ksh doesnt work, manual does?

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


All Replies
Solution
‎04-06-2018 01:04 PM
Contributor
Posts: 27

Re: mail TO limit? works ksh doesnt work, manual does?

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. 

 

 

 

Super User
Posts: 10,280

Re: mail TO limit? works ksh doesnt work, manual does?

See this note: http://support.sas.com/kb/15/883.html

 

I always keep the length of my code lines below 80. That way I can correctly display my codes in a default telnet window, and I never need to side-scroll.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Super User
Posts: 10,280

Re: mail TO limit? works ksh doesnt work, manual does?

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.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 126 views
  • 1 like
  • 2 in conversation