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 (October 2005, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 25 Oct 2005 14:38:05 -0700
Reply-To:     David L Cassell <davidlcassell@MSN.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         David L Cassell <davidlcassell@MSN.COM>
Subject:      Re: Saving 3 lines of array declaration/So Concise that it
              becomes Scary/proc compare valid?
In-Reply-To:  <200510251910.j9PHZbiv020056@mailgw.cc.uga.edu>
Content-Type: text/plain; format=flowed

toby989@HOTPOP.COM wrote: >Refering to my post on Oct 20, I was looking for a more simple way for >my code, got a suggestion (relating to the if statement) and implemented >it the following way. > >data ps2004dic; >set psdata.ps2004; >array q q:; >do over q; >if q~=. then q=0<q<3; >end; >run; > >Now I experimented some more and found an very concise code that seems >almost scary to me. Is following code a valid substitution for the above >one - omitting an explicit array declaration? > >data ps2004dic; >set psdata.ps2004; >if q: ~=. then q: = 0< q: <3; >run; > >I run a proc compare on both of the resulting datasets and it shows they >are exactly the same, however, are there loopholes that proc compare >cannot detect?

This didn't work for me either.

Are you *sure* this ran for you? Can you show us the log where it says that the data step ran and created the file you were expecting?

Otherwise, you ran the code, it failed to create the new data set, and it kept the *previous* copy of this file for your use. That file matched up with your test file, and you found no differences. But it wasn't created using this step. That's my guess, anyway.

Now if you were programming in Perl or APL, I might expect some sort of resultant from this.

HTH, David -- David L. Cassell mathematical statistician Design Pathways 3115 NW Norwood Pl. Corvallis OR 97330

_________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


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