Schema file help needed

chand012
Posts: 70
Joined: Mon Dec 18, 2000 4:34 pm

Schema file help needed

Post by chand012 »

I need help writing a schema file for importing ASCII data. I have tried using the Tagged Format Data examples, but keep having problems. My data has these characteristics:

* Records are delimited by a blank line
* 5 fields per record
* Each field begins on a new line
* Each field is preceded by a text label of the form "Label: "
* Fields 1, 2, and 4 are single-line fields
* Fields 3 and 5 may be multiple lines

I am specifically having trouble importing the multiple line fields. The single-line fields are OK.
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Schema file help needed

Post by mark »

For the multiline fields you'll need some kind of delimiter to know when they stop. The next field usually works for that. The expression might be:

>>\x0a\RField3:=\P[\x20\x09]*!\x0a\RField4:+