Help using Base SAS procedures

Problem in sending special Characters by mail

Reply
N/A
Posts: 0

Problem in sending special Characters by mail

Hi I am using the following code to send mails from z/OS to email addresses.My mail datset in z/OS contains special characters like Open Square Bracket and closed square brackets.[,]..but when I receive the mail these special char are converted into some junk characters.I have to use CODESET which understands these special char.How to use those CODESETS in this mail pgm so that special characters also will be sent right in the attachment.

FILENAME MYMAIL EMAIL;
DATA _NULL_;
FILE MYMAIL TO=("mail address")
SUBJECT='TEST MAIL FROM SAS'
ATTACH=("datasetname" EXT='TXT');
PUT 'HI,';
PUT 'ATTACHMENT Report Test Mail Summary';
RUN;
Respected Advisor
Posts: 3,901

Re: Problem in sending special Characters by mail

Hi rao

A statement that I've seen working sending attachements from a Mainframe was:
attach =("datasetname" ct='text/plain' extension="TXT")

If it's 'only' about special characters: If you dare not to be part of the (US-) English realm in the world then I remember quite a bit of problems with finding the accurate translation table for EBCDIC/ASCII conversions. Does it work in 'normal" email text with the translation of special characters?

HTH
Patrick
N/A
Posts: 0

Re: Problem in sending special Characters by mail

I am using the same attach statement.my dataset(file) in mainframe is in EBCDIC format and /charset is ibm-037 and my txt file is ASCII and should be compatible with iso8859-1 to display special characters.Could you please suggest the syntax I can use for that..thanks..
Respected Advisor
Posts: 3,901

Re: Problem in sending special Characters by mail

Hi Rao

I can't promise that this works - but you could give it a try:

attach =("datasetname" ct='text/plain' extension="TXT" encoding='ebcdic037' outencoding='latin1' )

http://support.sas.com/onlinedoc/913/getDoc/en/lrdict.hlp/a002058232.htm

Cheers, Patrick
Ask a Question
Discussion stats
  • 3 replies
  • 198 views
  • 0 likes
  • 2 in conversation