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 (October 2001, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 11 Oct 2001 14:00:34 -0400
Reply-To:   "Fehd, Ronald J." <rjf2@CDC.GOV>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Fehd, Ronald J." <rjf2@CDC.GOV>
Subject:   Re: reading hierarchical file w. varying number of sub-records
Comments:   To: Jim Moody <moody.77@OSU.EDU>
Content-Type:   text/plain

From: Jim Moody [mailto:moody.77@OSU.EDU] >Thanks in advance for any help you can give. >I have an ascii data file that is hierarchical, >with a varying number of lines for each case. >That is, each case has a 'type1' record, >but may have 0 to ?? type 2, type 3 etc. records.

clue: use retain for your type=1 records

I would recommend that you read the file and then transpose it. You've got enough problems reading the multi-type records without also trying to stuff them into arrays.

Beside which you don't or may not know the max number of items in your array(s). Transpose will do that work for you.

SAS is powerful, use it. Thinking Too Much(tm) often gets you into sin: 'missed the -- where was I aiming? -- mark!'

Ron Fehd the macro maven CDC Atlanta GA USA RJF2@cdc.gov OpSys: Win_Pro Ver: 8.2

By using your intelligence you can sometimes make your problems twice as complicated. -- Ashleigh Brilliant


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