|
You're not hitting the "AFTER FIRST READ" statement because the RETURN
statement tells SAS that you're through with the current section of
code, which in this case is the main data step loop. Remove the RETURN
statement.
You may have thought that RETURN exits from the macro, but RETURN isn't
a macro statement. It would be useful to have a %RETURN statement, I
think, but there's no such critter.
--
JackHamilton@FirstHealth.com
Development Manager, Technical Group
METRICS Department, First Health
West Sacramento, California USA
>>> "Rick Bargar" <Rick_D_Bargar@CHCMAIL.COM> 01/11/2002 12:32 PM >>>
In my Macro Section at the top of my program I have:
%MACRO R_OPENLF;
/* READ FROM THE OPEN LATE ACCOUNTS FILE */
INFILE OPENLF EOF=ENDIT MISSOVER;
INPUT @26 OPENLF_NBR $11.
@;
T='IN R_OPENLF';PUT T=;PUT OPENLF_NBR=; /* debugging
statement */
RETURN;
/* this is unneeded, right? */
%MEND R_OPENLF;
Then a few more Macros
Then the Mainline section:
/**/T='BEFORE FIRST READ';PUT T=;
%R_OPENLF; /* ACCOUNTS THAT HAVE AT LEAST ONE OPEN LF */
/**/T='AFTER FIRST READ';PUT T=;
%R_MASTER; /* MASTER FILE */
/**/T='AFTER MASTER READ';PUT T=;
My debugging statements print the following:
T=BEFORE FIRST READ
T=IN R_OPENLF
OPENLF_NBR=80000739450
T=BEFORE FIRST READ
T=IN R_OPENLF
OPENLF_NBR=80001100330
T=BEFORE FIRST READ
T=IN R_OPENLF
OPENLF_NBR=80001581000
Why aren't I hitting the "AFTER FIRST READ" statement?
Thanks
Rick Bargar
PS. Any other constructive criticism welcome!
|