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 (July 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 21 Jul 2006 08:41:58 -0700
Reply-To:   "William W. Viergever" <william@VIERGEVER.NET>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "William W. Viergever" <william@VIERGEVER.NET>
Subject:   Re: making a array dynamic
In-Reply-To:   <129a50e0607202033i173147b8k23d4c21a2482d78f@mail.gmail.com >
Content-Type:   text/plain; charset="us-ascii"; format=flowed

At 08:33 PM 7/20/2006, Joe Whitehurst wrote: >Murugappan, > >Unlike many of your duller SAS-L colleagues,

ouch!!!

talk about a meat cleaver segue ...

joe, you know i mean this in the best way, but i can't help wonder

which is worse

being duller or being a dullard

:-), yawn ....

and here i was looking forward to a pleasant fryeday under a 100

out

>you seem to be ready to >move up to SAS Component Language which has a construct tailored for >your desires: > >Creating Data Dynamically in SCL >SCL lists are dynamic rather than static. That is, SCL programs create >these lists at run time. This means that list sizes are computed at >run time rather than before the list is created. Further, unlike >arrays, which have a fixed size, a list's length can grow or shrink to >accommodate the amount of data you want to maintain. > >SCL lists can contain items of mixed types, whereas all SAS arrays >are fixed in type. (Depending on its declaration, an array contains >either numeric data or character data, but not both). One item in an >SCL list can be a number and the next item can be a character string, >while a third might be another list. Further, you have the freedom to >replace a numeric value with a character value in a list, and vice >versa. Although you can make lists that are of fixed type, you have >the freedom to allow multiple types in the same list. > >Note: Character values that are stored in SCL lists can be up to >32,766 characters per item. > >Gentleman Joe Joker > >On 7/20/06, Murugappan Ramanathan <murugappan.x.ramanathan@us.hsbc.com> wrote: >>i have a character variable whose values look like this >>pke >> >>1010,2010 >>1011,2011 >>1013,2013 >>1014,2014 >>1015,2015 >>1016,2016 >>1017,2017 >>1018,2018 >>1019,2019 >>1020,2020 >>1010, 1011, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 2010, 2011, >>2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 >>1010, 1011, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 2010, 2011, >>2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 >>1010, 1011, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 2010, 2011, >>2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 >>1010, 1011, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 2010, 2011, >>2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 >>1010, 1014, >>2010,2014 >>1011, 1013, >>2011,2013 >>1015,2015 >>1016,2016 >>i read this character string and create an array and transorm each number >>into a array element. now i have fixed the array size. but i want to make >>the array size depended upon the number of numbers in the character >>string. >>array pk(30)= $ pk1 - pk30; >>do i=1 to 30; >>pk(i)= scan(pke,','); >>end; >>i want to make the size of array pk >>dynamic. >

--------------------------------------------------- William W. Viergever Viergever & Associates Health Data Analysis / Systems Design & Development Sacramento, CA 95825 william@viergever.net (916) 483-8398 ---------------------------------------------------


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