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 (September 2000, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 12 Sep 2000 21:27:29 -0400
Reply-To:     paula <icj808@USWEST.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         paula <icj808@USWEST.NET>
Subject:      Re: Reading four-line records

I have to admit this is not a very well put question. The problem is resolved. This is a report used on mainframe. I simply asked the coder to unformat the data back to one record per line. The problem is solved.

paula D "paula" <icj808@uswest.net> wrote in message news:GZWt5.1021$M06.243198@news.uswest.net... > I have a text file that looks like this > > 1122Issuer bin: 444499 Bankruptcy alerts date: > 00/00/2000 > 1122 > 1122------------------------------------------------------------------------ > ----------- > 1122 address > 1122trace/area field5 > Date89 > 1122act3/field6 field8 Date3 > field76 > 1122------------------------------------------------------------------------ > ----------- > 1122 larkin drive > 1122a4444w23 ACP92 00249 > 1122cancel0026 None 00266 buy > 1122------------------------------------------------------------------------ > ---------- > > This is how a typical record looks like, read under WordPad under Windows > NT. > The top block are field names. The bottom half are readings corresponding to > each field on the top. All the fields as presented here are simplied. For > example, the address field is much longer that it appears here. > > What I want to accomplish is to read them into SAS. I want to get rid of the > top block; since in SAS view, the column labels will tell what the fields > are. I also want to rid of the header part starting with Issuer Bin.... > > Each record looks like this. > > I am experimenting this way: Count from the left side of the first line > (1122Issuer bin: 444499...) to the last dash on the right end of the last > line. The total is my record length. The format is Fixed, since each record > follows the same regularity. Then assign fields for the field names and the > values for the fields respectively and differently. Finally, use Keep to > keep only the value fields. > > I don't know if this is going to work. I was told there will be files coming > in everyday. No body knows if they are similar to each other. Manuaaly > wading through everyday is a nightmare. I wonder if anybody has better idea > to parse this. TIA. > > Paula D > >


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