BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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;
3 REPLIES 3
Patrick
Opal | Level 21
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
deleted_user
Not applicable
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..
Patrick
Opal | Level 21
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

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 999 views
  • 0 likes
  • 2 in conversation