Subject:How to set delimiters if it's not a character? Author:Thomas Allen Date:21 Jul 2009 11:00 AM
Hi
I've just purchased the Enterprise Edition 2009R2 and even though I've watched the videos I’m finding lots of things I cannot work out so sorry if quite a few questions appear from me.
I'm trying to create a custom EDI > XML Conversion Definition with these problems I cannot workout.
My elements are always the first 10 chars and values all chars afterwards, with a CR/LF as the terminator (cf/lf works ok). I tried a fixed width option but cant see how to specify the width in the properties?
EDIREC10001astringvalue
EDIREC10002MySecondValue
EDIREC10003MyVALUE
etc to convert to:
<EDIREC10001>astringvalue</EDIREC10001>
<EDIREC10002>MySecondValue</EDIREC10002>
<EDIREC10003>MyVALUE</EDIREC10003>
I would also like to map the element names to real names such as :
Subject:How to set delimiters if it's not a character? Author:Tony Lavinio Date:21 Jul 2009 04:09 PM
If the file is fixed-width, to mark the start of a new field
put the cursor on the first character of the field and right-click.
One of the menu options will be "Begin field in this column".
If you have more than one type of record, consider using the
"Create Node/Pattern" option; this lets you mark each row as being
of a different type and structure based on it matching a certain
pattern you specify.
Subject:How to set delimiters if it's not a character? Author:Tony Lavinio Date:29 Jul 2009 09:20 AM
1. File|New|Custom XML Conversion
2. Choose the input file, set as fixed-width
That's the first step.
Now, you can set up filters and change field names:
3. Right-click on the first row
4. Choose "Add node and pattern"
5. Take the defaults or change the row element name (for example,
to "comments"; then click OK
6. Do the same for each other row
Now you've got separate record layouts for each row, based
on the characters those rows each start with.
Next, split the fields apart in each row:
7. Right-click on the first "a" on the first line
8. Choose "Begin field in this column" from the menu
9. Do the same for each other row, at the position(s) you want
If you do a slow double-click in the schema tree on the
right, you can rename any of the objects in the tree.