BookmarkSubscribeRSS Feed
PKumar1
Calcite | Level 5

I am very new to SAS. We have a requirement to attach a file and send in an email to outlook from mainframe. I was able to get the code and send the the files as attachments. however the font I would like to have is Courier new. I am receiving the email with 'Times New Roman' in my outlook. It is because of Outlook setup?

 

Here is the code I am using.

filename myfile email

to = "xxxxxx"

from="xxxxx"

subject="this is the output file"

attach=("xxx.xxx.xxx" name ="Sample report" ext="zip");

Data _NULL_;

file myfile;

put '******************************';

put '* for                              *';

put '*this is from xxxxxxx job *';

Run;

quit:

 

Though I have the PUT statements ending at the same positions, the formatting is not expected.

Please advise where I went wrong.

 

2 REPLIES 2
ballardw
Super User

Data _null_ file creation as shown has no font information as it creates text only and the default font for the viewer is likely used. Change the view in the text viewer OR:

To force a specific font you would need to use a file format that includes font information such as RTF (read in Word or similar) or PDF. Use an appropriate ODS destination when creating the file and use an ODS style with the desired font family.

 

 

PKumar1
Calcite | Level 5

Thanks for your reply. Let me explore options with ODS.

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