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 (May 2004, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sat, 8 May 2004 13:21:27 -0700
Reply-To:     "Miller, John" <millerj@WSIPP.WA.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Miller, John" <millerj@WSIPP.WA.GOV>
Subject:      Re: Missing %MEND statement.
Comments: To: David Neal <DNeal@uaa.alaska.edu>
Content-Type: text/plain

Excellent! Thanks. I will try this in the future. Your explanation was very clear and I suspect others on SAS-L could benefit from it, so ...

-----Original Message----- From: David Neal [mailto:DNeal@uaa.alaska.edu] Sent: Saturday, May 08, 2004 12:50 PM To: 'Miller, John' Subject: RE: Missing %MEND statement.

Yes it does. Remember that SAS will see anything that starts with a * and ends with a semicolon as a comment unless it is processing a text string. So, if you were missing a single quote and you submitted the line (and you submitted *';*"; ), SAS would see the * as text and then close the test string with a single quote. The second part (*";) would only appear as a comment. Now if you were missing a double quote, it would read everything up to the double quote as text but then close the text with the double quote. The semicolon would then finish the line.

-----Original Message----- From: Miller, John [mailto:millerj@wsipp.wa.gov] Sent: Saturday, May 08, 2004 11:42 AM To: 'David Neal' Subject: RE: Missing %MEND statement.

Yes, but I usually just use the offending value, like: ";

and, sometimes it does work - sometimes it doesn't and I'm off and running.

Does submitting the collection of *';*"; work better?

-----Original Message----- From: David Neal [mailto:DNeal@uaa.alaska.edu] Sent: Saturday, May 08, 2004 12:37 PM To: 'Miller, John'; SAS-L@LISTSERV.UGA.EDU Subject: RE: Missing %MEND statement.

Have you tried the old

*';*";

trick to close off quotes? (I usually put the one I'm most likely to have used first but it doesn't matter. What matters is getting out of the "whimsical world" so you can keep working.)

David

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Miller, John Sent: Saturday, May 08, 2004 10:38 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Missing %MEND statement.

Does anybody have a better approach to this problem?

Every once in awhile I like to amuse myself by putting an odd number of quotes in the macro I am developing so that I can get entangled in the whimsical world of "Missing %MEND statement". I then enjoy a fast round of play which goes like this:

- submit a quote in the hope that I can clear the problem

- submit a semi-colon for the same reason

- submit a %mend; to see if I have done any good

- sigh deeply and proceed to submit varying numbers of quotes, semi-colons and %mends

- admit that I may have to kill SAS and start over to get out of this loop

- stare menacingly at log statements like the following, then get a cup of coffee:

19731 ";

WARNING: Missing %MEND statement.

19732 ";

WARNING: Missing %MEND statement.

19733 %mend;

ERROR: Macro keyword MEND appears as text. A semicolon or other delimiter may be missing.

WARNING: Missing %MEND statement.

19734 %mend;

ERROR: Macro keyword MEND appears as text. A semicolon or other delimiter may be missing.

WARNING: Missing %MEND statement.

. . .

-----------------------------------------------------------------------

John Miller

Washington State Institute for Public Policy

110 East Fifth Avenue, Suite 215

Olympia, WA 98504-0999

(360) 586-9436

millerj@wsipp.wa.gov

website: www.wsipp.wa.gov <http://www.wsipp.wa.gov>

-----------------------------------------------------------------------


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