LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (January 2002, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 11 Jan 2002 14:09:25 -0700
Reply-To:   Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Subject:   Re: SAS Flow
Comments:   To: Rick_D_Bargar@CHCMAIL.COM
Content-Type:   text/plain; charset=us-ascii

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!


Back to: Top of message | Previous page | Main SAS-L page