the first 4 lines belong to one data record which goes to 4 tables(1,2,3,4), the second 4 lines belong to the next data record. so basically the flat file contains many customer records, each record is divided into lines, each line represent a row in a table(RDB), a customer record might have multiple rows of the same table, e.g. it might have 3 lines represent table(3).
Subject:convert positional flat file to xml Author:Tony Lavinio Date:24 Jul 2006 01:06 PM
The short answer is "yes".
Stylus Studio can convert files where each record is fixed-length and
the fields within are fixed-width, *OR* where each record is variable
length and the individual fields are either fixed- or variable-width.
Tell Stylus Studio that the file is fixed width, but specify a row
delimiter, such as CR,LF.
Then you can use the *pattern matching* feature to select different
layouts based on some distinguishing pattern within the line.
Guessing by your comment, you have an older version of Stylus Studio.
What version do you have? You can install the above side-by-side
with your older version.
The fixed-width wizard is only a small subset, and it is doubtful
it will help you if different rows have fields with different lengths.
And that wizard has been retired as of recent builds.
Subject:convert positional flat file to xml Author:Firas Arabo Date:25 Jul 2006 10:56 AM
I read the tutorials and watched the videos before downloading the enteriprise edition, and the version I have has the "convert to xml" tool, I don't know if it is different than the latest version or not though!
so I tried to convert my positional flat file and faced many issues:
1- I chose line oriented region, but I couldn't specify the beginning of the fields. If I choose fixed line width then I can specify the beginning of each field. what is the point of not allowing this feature to the line oriented region?
2- the matching pattern is based on characters, I can match all raws that begins with "record1", but I am looking for a way to match it based on position, let's say position 37-39.
3- is there any mechnasim to make stylus to automatically start a new region of record2 after record1 ends?
Subject:convert positional flat file to xml Author:Tony Lavinio Date:26 Jul 2006 02:59 AM Originally Posted: 26 Jul 2006 03:00 AM
>I read the tutorials and watched the videos before
>downloading the enteriprise edition, and the version I
>have has the "convert to xml" tool, I don't know if it is
>different than the latest version or not though!
You want build 653c or later.
You can see this in Help -> About.
>so I tried to convert my positional flat file and faced
>many issues:
>1- I chose line oriented region, but I couldn't specify
>the beginning of the fields. If I choose fixed line width
>then I can specify the beginning of each field. what
>is the point of not allowing this feature to the line
>oriented region?
You want the fixed-width region, but after you select it,
you can set your record delimiter (e.g. CR,LF). Then you
will be able to positionally size your fields.
>2- the matching pattern is based on characters, I can
>match all raws that begins with "record1", but I am
>looking for a way to match it based on position, let's say
>position 37-39.
Matching is based on regular expressions. Something
like ^.{36}XXX (untested!) should match XXX in positions
37-39.
>3- is there any mechnasim to make stylus to automatically
>start a new region of record2 after record1 ends?
Subject:convert positional flat file to xml Author:Simon Bell Date:17 Aug 2006 11:30 AM
Hi,
I'm trying to evaluate Stylus Studio and am having similar issues.
The flat file I'm looking to convert to and from XML is positional.
Meaning that positions 1-3 will contain data which needs to map to a node, then 4-8 will contain data which needs to be mapped to another node. Whilst the file itself is fixed width, 800 characters, I'm not finding the functionality to work with positional files.
Could you help me out?
Thanks