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 (June 2011, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 22 Jun 2011 11:55:01 -0400
Reply-To:     bbser 2009 <bbser2009@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         bbser 2009 <bbser2009@GMAIL.COM>
Subject:      Re: Open code statement recursion detected, macro code
Comments: To: Jim Groeneveld <jim.1stat@YAHOO.COM>
In-Reply-To:  <201106221513.p5MAoltI005362@waikiki.cc.uga.edu>
Content-Type: text/plain; charset="us-ascii"

Jim

Thanks a lot for your reply. I restarted the session, followed your suggestion, and got the desired answer. Now my question is: why not just regard "www" as a text string of 5 characters?

Max (Maaxx)

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Jim Groeneveld Sent: June-22-11 11:14 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: [SAS-L] Open code statement recursion detected, macro code

Hi Max,

Remove the double quotes around "www", this is macro language, you know, and everything is text.

Regards - Jim. -- Jim Groeneveld, Netherlands Statistician/SAS consultant http://jim.groeneveld.eu.tf

On Wed, 22 Jun 2011 09:58:44 -0400, bbser 2009 <bbser2009@GMAIL.COM> wrote:

>Hi there > >As indicated below: >1-3: Just normal macro code >4-5: Since the book I am reading says the first argument of %substr() can be >a character string, so I tested this with "www" but ended up with that >error. >6-8: I switched back to the old code in the first place, still getting the >same error information. > >Could you explain what's going on here? Thank you very much! > >Max >(Maaxx) > >================ >1 %let xx=www; >2 %let yy=%substr(&xx,2); >3 %put &yy; >ww >4 %let yy=%substr("www",2); >5 %put &yy; >ERROR: Open code statement recursion detected. >ERROR: Open code statement recursion detected. >6 %let xx=www; >7 %let yy=%substr(&xx,2); >ERROR: Open code statement recursion detected. >8 %put &yy; >ERROR: Open code statement recursion detected.


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