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 (March 2000, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 8 Mar 2000 09:56:33 -0500
Reply-To:     Mark.K.Moran@CCMAIL.CENSUS.GOV
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
Comments:     To: Jim Groeneveld <J.Groeneveld@ITGROUPS.COM>
From:         Mark Moran <Mark.K.Moran@CCMAIL.CENSUS.GOV>
Subject:      Re: Q array prob and also Tutorial
Comments: To: SAS-L@LISTSERV.VT.EDU
Content-type: multipart/mixed;
              Boundary="0__=MEJYcOqTFdxmeUj17tzPurUFxALSajflfxYv1hoTjDztaI7jSzlGfrr6"

Jim's response, below, to Christian brought to mind a general comment. Do you know what some of us SAS users who have not quite thoroughly mastered the SAS language could use? It would be helpful if either SAS-L or the SAS Institute could provide a tutorial on reading errors and warnings in the LOG. In some cases, I have spent literally hours pouring over errors in the LOG, only then showed the LOG to someone more experienced with SAS than I and had them point out the problem in a minute or less. I have always wanted to be able to do that, but people have not seemed interested so far in educating those of us less enlightened. I think there is more than simply raw experience going on here, there is also some degree of skill, because some SAS Users catch on to reading the LOG much faster than others. IMHO, this tutorial would be very productive for a lot of SAS users of all levels and skills.

Mark

Jim Groeneveld <J.Groeneveld@ITGROUPS.COM> on 03/08/2000 08:27:53 AM

Please respond to Jim Groeneveld <J.Groeneveld@ITGROUPS.COM>

To: SAS-L@LISTSERV.VT.EDU

cc: (bcc: Mark K Moran/CSD/HQ/BOC)

Subject: Re: Q array prob: numer of vars > 10

Christian,

This just concerns a typing error of yours. Look at your code carefully. Don't you see anything peculiar? Correct, in array declaration f2 var210 should be var29 (or var30). Below array f2 includes array f3, that is why. And the frequency for a var30=1 apparently is 0, so it does not occur; I think var30 does not exist. Am I right?

Regards - Jim. -- Y. (Jim) Groeneveld, MSc IMRO TRAMARKO tel. +31 412 407 070 senior statistician, P.O. Box 1 fax. +31 412 407 080 head IT department 5350 AA BERGHEM IMRO TRAMARKO: a CRO J.Groeneveld@ITGroups.com the Netherlands in clinical research

My computer seems more


-compatible than I am myself.

> -----Original Message----- > From: Christian F.G. Schendera [SMTP:schendera@NIKOCITY.DE] > Sent: Tuesday, March 07, 2000 6:51 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Q array prob: numer of vars > 10 > > I have an array prob. Code runs fine for arrays with vars < 10 (see vars > FRAGE1 and FRAGE3). At FRAGE2 the array misses category 10 and instead > runs > on into the vars of FRAGE3 (see output below). How could I stop SAS from > doing this? > Best, Chris > > > data TEST2 (keep = FBNr frage1 frage2 frage3 ) ; > set TEST ; > array newvars(*) FRAGE1 FRAGE2 FRAGE3 ; > array f1(*) var11-var14 ; > array f2(*) var21-var210 ; > array f3(*) var31-var37 ; > > do i = 1 to dim(newvars) ; > newvars(i) = . ; > end ; * set all to missing ; > do i = 1 to dim(f1) ; > if f1(i) = 1 then do ; > FRAGE1 = i ; > output ; > end ; > end ; > > do i = 1 to dim(newvars) ; > newvars(i) = . ; > end ; * set all to missing ; > do i = 1 to dim(f2) ; > if f2(i) = 1 then do ; > FRAGE2 = i ; > output ; > end ; > end ; > > do i = 1 to dim(newvars) ; > newvars(i) = . ; > end ; * set all to missing ; > do i = 1 to dim(f3) ; > if f3(i) = 1 then do ; > FRAGE3 = i ; > output ; > end ; > end ; > run ; > > Cumulative Cumulative > FRAGE2 Frequency Percent Frequency Percent > ffffffffffffffffffffffffffffffffffffffffffffffffffff > 1 49 5.2 49 5.2 > 2 57 6.0 106 11.2 > 3 47 5.0 153 16.2 > 4 18 1.9 171 18.1 > 5 25 2.6 196 20.7 > 6 18 1.9 214 22.6 > 7 1 0.1 215 22.7 > 8 2 0.2 217 22.9 > 9 27 2.9 244 25.8 > data of FRAGE3! -> 11 58 6.1 302 > 31.9 > data of FRAGE3!-> 12 37 3.9 339 > 35.8 > data of FRAGE3!-> 13 34 3.6 373 > 39.4 > data of FRAGE3!-> 14 28 3.0 401 > 42.4 > > > FRAGE3 Frequency Percent Frequency Percent > ffffffffffffffffffffffffffffffffffffffffffffffffffff > 1 58 33.7 58 33.7 > 2 37 21.5 95 55.2 > 3 34 19.8 129 75.0 > 4 28 16.3 157 91.3 > 5 1 0.6 158 91.9 > 6 12 7.0 170 98.8


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