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 2007, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 11 Jul 2007 12:32:32 -0400
Reply-To:     Gerhard Hellriegel <gerhard.hellriegel@T-ONLINE.DE>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Gerhard Hellriegel <gerhard.hellriegel@T-ONLINE.DE>
Subject:      Re: Reading data from hierarchical file

in addition to my other mail:

it seems to be easy to read the ...other line... with a INPUT statement. The 102 you can ignore by:

if abc="102" then delete;

Gerhard

On Wed, 11 Jul 2007 08:21:49 -0700, Metricsdude <bsj_adams@HOTMAIL.COM> wrote:

>Hi Again, > >Can anyone give me a clue re the best way to read in a hierarchical >file. I have the following data in a text file > >ZHV|0000026338|B0014001|X|BGAS|X|BGAS|20070704101428|EGATE|MDB||TEST| >001|G| >002|2435059444|1539135008| >102||||27||WHITEGATE ROAD||CHADDERTON|OLDHAM||OL9 9PW| >003|00000000012201231330|0000435126442||Mr A >CROFT ||||||850005853359| >004|002717 |20070629|0000007080|0000007571|| > >where ZHV line is the header and the 001 line signifies the start of a >new group, I want to read in all the data from the 002, 003 and 004 >line ignoring the 102 group into one data set. I also want to retain >the date from the header which i presume i just the retain >statement.... > >I am trying to use the input @ comand with if statements and but >canonly read in the 001 and 002 data succesfully.... Any tips or >examples of code would be much appreicated. > >ben


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