Date: Tue, 12 Jul 2005 11:03:41 -0600
Reply-To: Alan Churchill <SASL001@SAVIAN.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Alan Churchill <SASL001@SAVIAN.NET>
Subject: Re: log error message into one variable
In-Reply-To: <20050712063550.70628.qmail@web51308.mail.yahoo.com>
Content-Type: text/plain; charset="us-ascii"
Well this certainly looks like SAS warnings and error parsing so some
suggestions. We've taken the time to fully parse SAS logs but we use .NET
currently for this processing but I can offer a pointer or two. ( Lots of
people have parsed SAS logs btw with SAS and there are tons of examples.)
First, straighten out your logs so that each line is integrated. You can do
this by looking for end-of-line markers. Notice that the subsequent lines of
error are missing a character in position 1. After doing that, the rest is
simpler.
Keep in mind while doing this that it takes a long time to parse these
properly. The log is a mess and it's worse as you get into macros and split
processes.
In the logs case, regular expressions are your friend. Use them for
everything you can.
Thanks,
Alan
Savian
"Bridging SAS and Microsoft Technologies"
http://www.savian.net
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of urbunti
Sent: Monday, July 11, 2005 11:36 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: log error message into one variable
Hi,
I am reading a text file which has lines like this
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted
string, a numeric constant,a datetime constant, a missing value, INPUT, PUT.
I tried using "." as delimiter but that thing is not working as some time if
i have line like
ERROR: File WORK.CDE.DATA does not exist.
then it will read only upto ERROR: File WORK
can anybody help. my aim is to capture the whole error message before the
period into one varible
Regards,
Bunti
---------------------------------
Yahoo! Mail
Stay connected, organized, and protected. Take the tour