Date: Sun, 30 Apr 2006 17:50:16 -0400
Reply-To: Jim Groeneveld <jim2stat@YAHOO.CO.UK>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jim Groeneveld <jim2stat@YAHOO.CO.UK>
Subject: Re: Q: v6 to v9
Hi Toby,
Did you have explicitly LOCAL macro variables ar that macro level of depth?
That would have protected sufficiently against badly designed GLOBAL
variables.
Anyway, to contribute to the subject, I remember that I once had something
like that. A very large program with quite some initial data, that stopped
after several hours somewhere in the middle without any error or warning.
When run with just a fraction of the data it ran fine! That turned out to
be an unintended nested macro call to itself, many hundreds of levels deep,
a recursive structure where a flat one had been intended. SAS has its (OS
dependent) maximum depth and dies quietly if that is exceeded.
See also http://tinyurl.com/lem4d
Regards - Jim.
--
Jim Groeneveld, Netherlands
Statistician, SAS consultant
home.hccnet.nl/jim.groeneveld
On Sat, 29 Apr 2006 17:51:48 +0000, toby dunn <tobydunn@HOTMAIL.COM> wrote:
>Ron ,
>
>Sounds to me like an infinite loop to me. The last time I had such a
>problem it was due to some idiot writing macro code so bad Ian would have a
>heart attack. In the end I found it. Some yahoo declared a do loop index
>variable 'I' as global and when I modified a macro which was nested five
>deep the global I overwrote an I index var I used and caused some badness
to
>really happen. The first time I saw the problem I had a log file 10 gigs
>big.
>
>
>
>Toby Dunn
>
>
>
>
>
>From: Ian Whitlock <iw1junk@COMCAST.NET>
>Reply-To: iw1junk@COMCAST.NET
>To: SAS-L@LISTSERV.UGA.EDU
>Subject: Re: Q: v6 to v9
>Date: Sat, 29 Apr 2006 15:51:54 +0000
>
>Ron,
>
>500,000 lines of log and 4,000 observations doesn't look like good odds.
>
>I once had a runaway program something like your description. It was
>due to a missing coma in main macro call. Are you sure that it is a
>version problem? The changes in macro that could cause problems in a
>latter version are mainly the introduction of new words that didn't have
>a meaning in a prior version.
>
>Since you say, you have been able to run with an empty data set, at least
>I think that is what "got it to run with just the data structure" means,
>you might try the MFILE option to get the generated code and then run that
>on some data.
>
>For another approach, you might give us some information. Are we looking
>at one macro of 20 lines? Or 100 macros with an average of 1,000 lines?
>Are the 500,000 lines of log code and notes, or the result of PUT
>statements? Is the number of lines do to an infinite loop? Or a complex
>task?
>
>How long was the log when it ran in version 6? How long did it take to
>execute? What sort of things does it do?
>
>On the other hand, if you just want sympathy, you have it.
>
>Ian Whitlock
>================
>Date: Fri, 28 Apr 2006 16:44:34 -0400
>Reply-To: "Fehd, Ronald J. (CDC/CCHIS/NCHM)" <rjf2@CDC.GOV>
>Sender: "SAS(r) Discussion"
>From: "Fehd, Ronald J. (CDC/CCHIS/NCHM)" <rjf2@CDC.GOV>
>Subject: Q: v6 to v9
>Content-Type: text/plain; charset="us-ascii"
>I am (attempting) testing some user v6 programs.
>The user supplied a v6 format catalog:
>FORMATS.SC2
>which prompts SAS to conclude the
>libname statement to use the v6 engine.
>NOTE: SAS (r) 9.1 (TS1M3)
>...
>8 LIBNAME LIBRARY "!ProjRoot\sas7b";
>NOTE: Libref LIBRARY was successfully assigned as follows:
> Engine: V6
> Physical Name: L:\Temp\sas7b
>The test program writes a Library.DataSet
>with ~200 vars and (eventually) ~4000 rows.
>The user complains that SAS hangs and never completes the data step.
>I've just aborted a run with 500,000 lines in the log
>and got it to run with just the data structure
>so I could see the Proc Contents:
>there are no numerics with length of 4, 6 and 7
>but methinks too many with lengths 3 and 5
>... oh! several $200.
>I suppose this is just my mumbling
>while trying to figure out
>why a macro with an %Include doesn't run in v9
>:-O
>Ron Fehd the macro maven
|