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.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1222 views
  • 0 likes
  • 2 in conversation