Reading a Outlook or Exchange folder with SAS

  • Follow


Step 1 - Create Access table
Create table in Access with the new table button and choose
"Link Table"
Change the file extension to Exchange() or Outlook()
Follow the prompts to the folder you desire.

Step 2 - Create SAS program to read the Access
proc import table='Inbox'
            out=Inbox(keep=received from subject Has_Attachments)
 	    dbms=access
            replace;
 	    database="C:\db1.mdb";
            run;

You can create a LIBNAME statement too, but it did not work for me
until I ran the PROC IMPORT above.
libname a access "C:\db1.mdb";

I was able to update the Inbox table with the LIBNAME statement but it
caused SAS some strange errors.
This was done with:
SAS 9.1 TS Level 1M2
XP_PRO platform
Operating System Information
Windows Version 5.1.2600

0
Reply bracyr (12) 9/21/2006 3:21:48 PM

Bracyr - nice!

I had no problem using the libname engine in XP SAS 9.13, except for
some reason it wants to reset my default SAS folder to "C:\Program
Files\Common Files\System\MSMAPI\1033\".

10   libname mail access 'db1.mdb';
NOTE: Libref MAIL was successfully assigned as follows:
      Engine:        ACCESS
      Physical Name: db1.mdb
11
12   data _null_;
13        set mail.'SAS-L'n(keep=subject from);
14        where from='bracyr@GMAIL.COM';
15        put (_all_) (=/);
16   run;

Subject=Reading a Outlook or Exchange folder with SAS
From=bracyr@GMAIL.COM

Subject=Re: Saving to a CSV File in Mainframe SAS
From=bracyr@GMAIL.COM

NOTE: There were 2 observations read from the data set MAIL.'SAS-L'n.
      WHERE from='bracyr@GMAIL.COM';
NOTE: DATA statement used (Total process time):
      real time           2.56 seconds
      cpu time            0.56 seconds
17
18   libname mail clear;
NOTE: Libref MAIL has been deassigned.


very interesting

Paul Choate
DDS Data Extraction
(916) 654-2160

-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
bracyr@GMAIL.COM
Sent: Thursday, September 21, 2006 8:22 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Reading a Outlook or Exchange folder with SAS

Step 1 - Create Access table
Create table in Access with the new table button and choose
"Link Table"
Change the file extension to Exchange() or Outlook()
Follow the prompts to the folder you desire.

Step 2 - Create SAS program to read the Access
proc import table='Inbox'
            out=Inbox(keep=received from subject Has_Attachments)
            dbms=access
            replace;
            database="C:\db1.mdb";
            run;

You can create a LIBNAME statement too, but it did not work for me
until I ran the PROC IMPORT above.
libname a access "C:\db1.mdb";

I was able to update the Inbox table with the LIBNAME statement but it
caused SAS some strange errors.
This was done with:
SAS 9.1 TS Level 1M2
XP_PRO platform
Operating System Information
Windows Version 5.1.2600
0
Reply pchoate (2551) 9/21/2006 8:41:53 PM


1 Replies
127 Views

(page loaded in 0.063 seconds)

Similiar Articles:













7/12/2012 4:27:17 PM


Reply: