Building models with SAS Enterprise Miner, SAS Factory Miner, SAS Visual Data Mining and Machine Learning or just with programming

How to parse 'messy' data?

Reply
Occasional Contributor
Posts: 9

How to parse 'messy' data?

Hi all,

I have some semi-structured text files that I'm trying to read into SAS v9.1.3. An example is shown below in blue.

The column headings are listed above the dashed line and the data blocks are below the line. I'm not sure how to parse the data into a table structure. Any suggestions would be greatly appreciated.

                               Daily Report for 08SEP11

                      Printed on 09SEP11 at EST 07:19:00

                                                                      Page  1

Tran No  R Company Name             DB/CR Amount       DB Curr Date/Time Appv'd

Tran ID  N Payment Method           Transfer Amount    CR Curr Date/Time Prnt'd

           Value Date               FX Rate

-------- - ------------------------ ------------------ -- ---- ----------------

2510001    READING RAINBOW              375.50 DB  USD 08SEP11 07:11:22

SUPERXFER R book                                                08SEP11 15:47:00

           08SEP11                                              * PENDING *

           Debit account number:  3333333333

           Credit bank aaa:       12345678

           Credit acct number: 1111111111

           Credit acct name:   IRA FLEXIBLE SPENDING ACCOUNT

2510002    BABY SUPERSTORE         175,000.00 DB  USD 08SEP11 07:20:31

BSUPER001 N Fedwire Out Interface                               08SEP11 08:20:40

           08SEP11                                              * CONFIRMED *

           Debit account number:  2222222222

           Receiving bank aba:    234567898

           Credit account number: 2222-1111111-7

           Credit account name:   IND OPSE

Frequent Contributor
Posts: 104

How to parse 'messy' data?

This question will get more exposure in "SAS Macro facility, Data step" section than this section.  It will also help if you could illustrate what is the desired outcome from this data.

Occasional Contributor
Posts: 9

How to parse 'messy' data?

Okay, thanks. I'll post the question with the desired outcome in that section.

Ask a Question
Discussion stats
  • 2 replies
  • 217 views
  • 0 likes
  • 2 in conversation