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 (August 2007, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 14 Aug 2007 19:34:25 -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: Create a Macro list from many records
In-Reply-To:  <200708020112.l71L14FP005865@mailgw.cc.uga.edu>
Content-Type: text/plain; format=flowed

coithienthai2002@YAHOO.COM.AU wrote: > >Good morning > >I have the following data in the following format and would like to my >macro list to be like below, is there a limit on the length of the macro >list??? > >data polno; >input polno $8.; >cards; >WC900333 >WC900260 >WC900271 >WC900476 >WC900511 >WC900512 >WC900513 >WC900514 >WC900515 >WC900516 >WC900517 >WC900518 >WC900519 >WC900520 >WC900521 >WC900680 >WC900681 >WC900682 >WC900551 >WC900552 >WC900554 >WC900555 >WC900556 >WC900557 >WC900558 >WC900559 >WC900261 >WC900550 >WC900553 >WC900560 >WC900561 >WC900562 >WC900351 >WC900570 >WC900571 >WC900572 >WC900573 >WC900762 >WC900763 >WC900764 >WC900765 >WC900766 >WC900767 >WC900768 >WC900769 >WC900770 >WC900771 >WC900841 >WC900842 >WC900843 >WC900844 >WC900089 >WC900115 >WC900116 >WC900117 >WC900118 >WC900120 >WC900127 >WC900129 >WC900134 >WC900136 >WC900139 >WC900346 >WC900383 >WC900603 >WC900604 >WC900647 >WC900648 >WC900745 >WC900119 >WC900121 >WC900122 >WC900123 >WC900124 >; >run; > >. >. >. >. >many more > >and I would like a macro list that I can call in my SAS program to be >generated like below > >('WC900019','WC900020','WC900021','WC900022','WC900023','WC900024', >'WC900025','WC900026','WC900027','WC900028','WC900029','WC900030', >'WC900031','WC900044','WC900045','WC900046','WC900047','WC900048', >'WC900049','WC900072','WC900075','WC900077','WC900089','WC900115', >'WC900116','WC900117','WC900118','WC900119','WC900120','WC900121', >'WC900122','WC900123','WC900124','WC900125','WC900126','WC900127', >'WC900129','WC900130','WC900131','WC900132','WC900133','WC900134', >'WC900136','WC900137','WC900138','WC900139','WC900140','WC900141', >'WC900143','WC900144','WC900145','WC900146','WC900147','WC900148', >'WC900149','WC900150','WC900151','WC900152','WC900153','WC900155', >'WC900156','WC900157','WC900158','WC900160','WC900161','WC900162', >'WC900163','WC900164','WC900165','WC900166','WC900167','WC900168', >'WC900169','WC900170','WC900172','WC900173','WC900174','WC900175', >'WC900176','WC900181','WC900182','WC900183','WC900185','WC900205', >'WC900206','WC900207','WC900208','WC900210','WC900211','WC900212', >'WC900214','WC900215','WC900216','WC900217','WC900218','WC900219', >'WC900220','WC900221','WC900222','WC900223','WC900224','WC900225', >'WC900234','WC900237','WC900242','WC900244','WC900248','WC900251', >'WC900253','WC900254','WC900258','WC900260','WC900261','WC900271', >'WC900333','WC900335','WC900336','WC900344','WC900346','WC900347', >'WC900348','WC900350','WC900351','WC900355','WC900357','WC900358', >'WC900360','WC900363','WC900364','WC900367','WC900368','WC900369') > >Thank you very much in advance > >Thien

It has already been pointed out that you are probably going about this the wrong way. I personally would do my best to leave the data in a SAS table and *not* shove it into a macro variable.

But the question was about a limit on the length of the macro variable. It looks to me as if you were planning on a big IN clause. That does not scale well. You would hit the scalability problem well before you got to the 'too long for a single macro var' problem.

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

_________________________________________________________________ Now you can see trouble…before he arrives http://newlivehotmail.com/?ocid=TXT_TAGHM_migration_HM_viral_protection_0507


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