BookmarkSubscribeRSS Feed
Ja5ya
Fluorite | Level 6

Hi, I'm trying to read in MSG file into SAS but wasn't able to do so.

Then I tried using LINUX command, I got it to convert to txt file but it wasn't readable by SAS. I used code like:

data _null_;

 x "cd /source/data/";

 x "rename .msg .txt *.msg";

run;


Can anyone help me in trying to read the Outlook MSG file from SAS? I'm ok with converting the msg file too into txt file but it should be SAS Readable.

 

Please help.

4 REPLIES 4
vellad
Obsidian | Level 7

You need to download the Outlook messages as .txt files and not .msg files. You can't just rename an .msg file as .txt and expect it to behave as .txt, because .msg has its own encoding rules and is not a simple flat file like a .txt file.
If you can't create the .txt files from scratch, you can download and use a utility such as this one to read the .msg files.

KS4NCS
Fluorite | Level 6

Hi Ja5ya,
You can use this python tool also to extract txt from msg file.
https://github.com/TeamMsgExtractor/msg-extractor
Hope this help.

Ja5ya
Fluorite | Level 6
Thanks. I'm looking into it.
SASKiwi
PROC Star

As a test, you can do a "File Save As" on an Outlook message you have opened.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 4 replies
  • 900 views
  • 1 like
  • 4 in conversation