XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Derrick ExumSubject: Varying Length Multiple Record Fixed Width Flat File to XML
Author: Derrick Exum
Date: 12 Sep 2008 02:55 PM
How do I go about creating a Conversion for a Fixed-Width Multiple Record fixed file when there are no separators between the fields?
Each record type has different fields of varying lengths. The fields are layed out by their position. The first 2 columns denotes the RecordType. After that the records vary depending on record type.

Example
RecordType 01

01001Albany 2006CVS090077

RecordType 02
02Alexander,Jane,Smith

RecordType 03
03097012TExpired Inspection

The layout for Record type 1 is First2 colums = RecordType, Colums 3-5 = CountyCode, 6-17 = CountyName, 18-21 = Year, 22-24 = DataRecordType etc.

The layout for RecordType 2 is First 2 columns = RecordType, Columns 3-30 = PersonsName(comma delimited)

The layout for RecordType 3 is First 2 columns = RecordType Columns 3-4 = SequenceNo, Columns 5-8 = ChargeCode, Columns 9 = ChargeType, Columns10-54 = Charged description etc.

Does anyone have any ideas?

Posttop
Tony LavinioSubject: Varying Length Multiple Record Fixed Width Flat File to XML
Author: Tony Lavinio
Date: 12 Sep 2008 10:05 PM
You can filter records based on content.

You want a file with one region, typed fixed.

If your records truly are fixed-length, set the record length.
if they have fixed-width fields but themselves have delimiters such
as CRLF, set that instead.

For each type of field, put the cursor on that row and choose
Add Node/Pattern. You can now use a regular expression to select
rows with similar characteristics. For example, to set the layout
for all rows beginning with XX, use "^XX" as the pattern (with the ^
and without the quotes).

Now you can set the fields widths, and they will affect just the XX
records.

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.