cancel
Showing results for 
Search instead for 
Did you mean: 

File content conversion suggestions Please

Former Member
0 Kudos

Hello Experts,

I am using MQ - JMS Sender Adapter where in Module Tab I need to convert the following file to Header & Detail record

I am getting the file from the MQ- Series as a Straight line no breaks

1) The first 70 char length of the line is always Header, In the Header first 3 character is always HDR next 14 character mandatory field then 8 character for Date remaining fillers

2) The 71 char starts with DTL it is detail record where first 3 DTL, Next 8 char Date, Next 8 char Date,Next 8 char Account, Next 10 char Customer, Next 20 char information,last 9 char Country

3) The 141 character similar to the above ( 2 condition ) like that every 70 character Detail Record.

How to handle the following straight line with out break to header & detail record.

Regards

Edward

Accepted Solutions (1)

Accepted Solutions (1)

justin_santhanam
Active Contributor
0 Kudos

Edward,

I would suggest you to import them in single field, and split them in mapping program.

raj.

Former Member
0 Kudos

Thanks Expert Raj,

Wonderfull idea, I will do as you mentioned.

Regards

Edward

Former Member
0 Kudos

Expert Raj,

One clarification,

Is it Possible to convert the whole record ( 90,000 ) record as a single XML file ?

Regards

Edward

ravi_raman2
Active Contributor
0 Kudos

Edward,

Yes its possible..Structure for xsd would be like this...

<?xml version="1.0" encoding="UTF-8"?>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<xsd:element name="SDN_TEST">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="DOCUMENT" minOccurs="0" maxOccurs="unbounded"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

<xsd:complexType name="VALUE">

<xsd:sequence>

<xsd:element name="OBJ_TYPE" minOccurs="0">

<xsd:simpleType>

<xsd:restriction base="xsd:string">

<xsd:maxLength value="999999999999"/>

</xsd:restriction>

</xsd:simpleType>

</xsd:element>

</xsd:sequence>

<xsd:attribute name="SEGMENT" type="xsd:string" use="required"/>

</xsd:complexType>

</xsd:schema>

A structure like the one above would generate an xml like below....

<?xml version="1.0" encoding="UTF-8"?>

<SDN_TEST xsi:noNamespaceSchemaLocation="Untitled6.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<DOCUMENT>text</DOCUMENT>

</SDN_TEST>

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Fixed File Content Conversion concept can be used.

Regards

R.Ragu

former_member556603
Active Contributor
0 Kudos
Former Member
0 Kudos