| Date: | Sat, 13 Jan 2001 17:17:37 -0000 |
| Reply-To: | DKVJ Cons Co UK <secretary@dkvj-cons.co.uk> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | DKVJ Cons Co UK <dkv-j_consultancies@TOTALISE.CO.UK> |
| Organization: | DKV-J Consultancies |
| Subject: | Reading MS OE5 email folder with SAS. |
| Content-Type: | text/plain; charset="iso-8859-1" |
I receive email on a regular basis, and have a SAS program that can parse
the text contents of each message to interpret the information sent.
I now want to create a fully automated process to read incoming messages and
act appropriately.
The email client is MicroSoft Outlook Express 5. The messages are identified
by a 'rule' or 'agent' process and passed to a particular folder, where they
are stored in a system folder with type 'dbx'.
I haven't been able to import this DBX file into anything except Outlook
Express, and the only File Export functions OE5 has for message folders is
for Outlook or MSMail. So, no option to create a text file!!
I have tried to read and parse the file using the varying length parameters
on a data step 'Infile' process. The read, however stops after 13k bytes
due to what is probably a character SAS interprets as an end of file marker.
The file is in fact 10MB in size.
Surely someone has successfully read email into SAS, and possible even with
MS email applications. Have you successfully exported the folder to a
standard database file? Or have you read the file in and managed to skip
the rogue character that is stopping my read?
Incidentally, the Import Wizard fails in both versions 6 and 8 with these
problems:
. rename as DBF and import as DBF: fails with insufficient memory,
despite NT4 and 320MB RAM available.
. import as special file: only the first 13k or so characters appear in
the buffer for definition of the data set vector.
Some code and the log below for those interested:
Regards
David
75 FileName EMLFLDER 'E:\Archive\Outlook mail\*********.dbx';
76
77 Data READJSV;
78 InFile EMLFLDER TruncOver RECFM = V LENGTH = RLENGTH LRECL =
13322;
79 Input @1 STRING $1 @;
80 Put 'Is the LRECL set correctly? 'RLENGTH=;
81 Do Loop = 1 To RLENGTH By 1;
82 Input @ LOOP STRING01 $Char1. @;
83 I ++ 1;
84 BYTEVAL = Rank( STRING01);
85 If I > 13300 Then
86 Put LOOP= STRING01 $Char1. ' ' BYTEVAL=;
87 Output;
88 End;
89 Run;
NOTE: The infile EMLFLDER is:
FILENAME=E:\Archive\Outlook mail\*********.dbx,
RECFM=V,LRECL=13322
Is the LRECL set correctly? RLENGTH=13321
LOOP=13301 BYTEVAL=18
LOOP=13302 { BYTEVAL=123
LOOP=13303 BYTEVAL=0
LOOP=13304 BYTEVAL=0
LOOP=13305 BYTEVAL=19
LOOP=13306 f BYTEVAL=131
LOOP=13307 BYTEVAL=0
LOOP=13308 BYTEVAL=0
LOOP=13309 BYTEVAL=20
LOOP=13310 " BYTEVAL=147
LOOP=13311 BYTEVAL=0
LOOP=13312 BYTEVAL=0
LOOP=13313 BYTEVAL=28
LOOP=13314 ¥ BYTEVAL=165
LOOP=13315 BYTEVAL=0
LOOP=13316 BYTEVAL=0
LOOP=13317 BYTEVAL=0
LOOP=13318 BYTEVAL=22
LOOP=13319 D BYTEVAL=68
LOOP=13320 BYTEVAL=16
LOOP=13321 a BYTEVAL=97
NOTE: 1 record was read from the infile EMLFLDER.
The minimum record length was 13321.
The maximum record length was 13321.
NOTE: The data set WORK.READJSV has 13321 observations and 5 variables.
NOTE: The DATA statement used 0.79 seconds.
|