LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (April 2003, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 9 Apr 2003 15:53:26 -0700
Reply-To:     Dale McLerran <stringplayer_2@YAHOO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Dale McLerran <stringplayer_2@YAHOO.COM>
Subject:      Re: IML print statement, bug or what?
Comments: To: "Huang, Ya" <yhuang@AMYLIN.COM>
In-Reply-To:  <9312B0A3065FA54EAB5A4D399EF96346EB12B5@api-exch-1.amylin.com>
Content-Type: text/plain; charset=us-ascii

Ya,

Wrap parentheses around each object which you wish to print if the object is not a named variable, vector, or matrix. That is, write

print (1) (2) (-3);

That will resolve just fine. The use of parenthese is required for printing objects/values which are created during execution of the PRINT statement.

Dale

--- "Huang, Ya" <yhuang@AMYLIN.COM> wrote: > Hi there, > > I am not familiar with proc iml. Today one of my coworker > asked me to help debugging her code, and I found a very > interesting thing, I'm not sure if it is supposed to behave > like this or we should consider it a design defect. > > 7 proc iml; > NOTE: IML Ready > 8 print 1 2 3; > 9 run; > NOTE: Module MAIN is undefined in IML; cannot be RUN. > 10 > NOTE: Exiting IML. > NOTE: PROCEDURE IML used: > real time 0.00 seconds > cpu time 0.00 seconds > > > 11 proc iml; > NOTE: IML Ready > NOTE: SCL source line. > 12 print 1 2 -3; > - > 22 > - > 200 > ERROR 22-322: Syntax error, expecting one of the following: a > > > Basically, if print statement try to print some positive constant > it works fine. But it won't accept a negative constant, in the > above sample, '-3'. Isn't it strange? The original problem is > caused by macro var which resolves to a negative number, something > like "print &abc". > > Comments? > > Thanks > > Ya Huang

===== --------------------------------------- Dale McLerran Fred Hutchinson Cancer Research Center mailto: dmclerra@fhcrc.org Ph: (206) 667-2926 Fax: (206) 667-5977 ---------------------------------------

__________________________________________________ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://tax.yahoo.com


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