|
Gary,
Four preliminary questions: (1) where is the macro variable NUMBTIME
created?; (2) where is the libname STATE defined?; (3) why is there an extra
comma at the end of the macro's declaration?; and (4) can you show an
example of a statement you are using (when the macro failed)?
Art
-------
"Gary" <GaryWeeks@gmail.com> wrote in message
news:1131898528.256386.266790@o13g2000cwo.googlegroups.com...
> I have a macro that has been working without problem for 3 years and
> now I am starting to get an error as described in the log below. The
> macro is called and executes successfully several times then error
> below occurs and it fails every time thereafter. All of the macro
> variables are resolved and if the code is run out side of the program
> that calls the macro there is no problem. Does anyone have any ideas
> what could be causing this problem?
>
> I have pasted the macro below and the piece of the log for a failure.
>
>
> Thanks,
>
> -Gary
>
>
> %macro progress(step, detail, state, batch,);
>
> %put State=&state Batch=&batch Step=&step Detail=&detail;
> data progress;
> length state $ 2 batch $ 3 step $ 80 detail $ 200 ;
> when=datetime();
> state="&state";
> batch="&batch";
> step=put("&step",$80.); put 'progress step=' step;
> detail=put("&detail",$200.); put 'progress detail=' detail;
> run;
>
> proc append base= state.&state._&batch._&numbtime._progress
> new = progress force;
> run;
>
> %mend; /* progress */
>
>
> MLOGIC(KICKOFF.PROGRESS): Beginning execution.
> NOTE: The macro PROGRESS is executing from memory.
> SYMBOLGEN: Macro variable STEP resolves to Duplicate check
> SYMBOLGEN: Macro variable DETAIL resolves to Checking for duplicate bc
> #s
> SYMBOLGEN: Macro variable STATE resolves to OK
> SYMBOLGEN: Macro variable BATCH resolves to 209
> MLOGIC(KICKOFF.PROGRESS): Parameter STEP has value Duplicate check
> MLOGIC(KICKOFF.PROGRESS): Parameter DETAIL has value Checking for
> duplicate bc #s
> MLOGIC(KICKOFF.PROGRESS): Parameter STATE has value OK
> MLOGIC(KICKOFF.PROGRESS): Parameter BATCH has value 209
> MLOGIC(KICKOFF.PROGRESS): %PUT State=&state Batch=&batch Step=&step
> Detail=&detail
> SYMBOLGEN: Macro variable STATE resolves to OK
>
> The SAS System
>
> SYMBOLGEN: Macro variable BATCH resolves to 209
> SYMBOLGEN: Macro variable STEP resolves to Duplicate check
> SYMBOLGEN: Macro variable DETAIL resolves to Checking for duplicate bc
> #s
> State=OK Batch=209 Step=Duplicate check Detail=Checking for duplicate
> bc #s
> MPRINT(KICKOFF.PROGRESS): data progress;
> MPRINT(KICKOFF.PROGRESS): length state $ 2 batch $ 3 step $ 80 detail
> $ 200 ;
> MPRINT(KICKOFF.PROGRESS): when=datetime();
> SYMBOLGEN: Macro variable STATE resolves to OK
> MPRINT(KICKOFF.PROGRESS): state="OK";
> SYMBOLGEN: Macro variable BATCH resolves to 209
> MPRINT(KICKOFF.PROGRESS): batch="209";
> SYMBOLGEN: Macro variable STEP resolves to Duplicate check
> MPRINT(KICKOFF.PROGRESS): step=put("Duplicate check",$80.);
> MPRINT(KICKOFF.PROGRESS): put 'progress step=' step;
> SYMBOLGEN: Macro variable DETAIL resolves to Checking for duplicate bc
> #s
> MPRINT(KICKOFF.PROGRESS): detail=put("Checking for duplicate bc
> #s",$200.);
> MPRINT(KICKOFF.PROGRESS): put 'progress detail=' detail;
> MPRINT(KICKOFF.PROGRESS): run;
>
> NOTE: The data set WORK.PROGRESS has 0 observations and 5 variables.
> WARNING: Data set WORK.PROGRESS was not replaced because this step was
> stopped.
> NOTE: DATA statement used (Total process time):
> real time 0.00 seconds
> cpu time 0.00 seconds
>
|