Skip to Content
author's profile photo Former Member
Former Member

Content conversion

Hi experts,

Anybody can explain how to read the iput file for the below format,

Name

2010-11-23

20:23:20

Credited

01

69863

And i need this is output where value is missing it should create a space in the output file as,

Name 2010-11-23 20:23:20 Credited 01 69863

I am trying with end separator and field separator with 'nl' but it is not working and the Record structure i have taken as a 'structure' please explain.

Regards

sumith

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Dec 09, 2010 at 02:58 PM

    Hi Sumith,

    Guess your problem would be solved if you give the fieldSeparator as SP or 0x20 or ' '

    Thanks and Regards,

    Krishna Sharma H

    Edited by: Krishna _XI on Dec 9, 2010 4:33 PM

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Krishna Sharma

      But

      It giving the below conversion message in the PAYLOAD,

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

      - <ns:MT_SENDER xmlns:ns="http...................">

      - <Record>

      <REC_TYPE>Trailer</REC_TYPE>

      </Record>

      - <Record>

      <REC_TYPE>2010-11-23</REC_TYPE>

      </Record>

      - <Record>

      <REC_TYPE>20:23:20</REC_TYPE>

      </Record>

      - <Record>

      <REC_TYPE>ARB_IN1_MAT</REC_TYPE>

      </Record>

      - <Record>

      <REC_TYPE>31</REC_TYPE>

      </Record>

      - <Record>

      <REC_TYPE>59819</REC_TYPE>

      </Record>

      </ns:MT_SENDER>

      I need this in below format in my pay load then only it is possible to map in the integration, Please look into the defect.

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

      - <ns:MT_SENDER xmlns:ns="http...................">

      - <Record>

      <REC_TYPE>Name</REC_TYPE>

      <F1 />

      <CADTE>2010-11-23</CADTE>

      <PERIOD />

      <CTIME>20:23:20</CTIME>

      <F2 />

      <FILE_ID>ARB_IN1_MAT</FILE_ID>

      <F3 />

      <SEQUENCE>3</SEQUENCE>

      <F4 />

      <REC_CNTR>59819</REC_CNTR>

      <F6 />

      </Record>

      </ns:MT_SENDER>

      Thanks

      sumith

  • Posted on Dec 09, 2010 at 06:13 PM

    Sumith,

    I think I misinterpreted your question... Guess you require FCC at Sender side... i.e you want to convert a Flat File to XML ... am I right ??

    If I am, then please follow the below steps...

    Recordset Name: Record,1

    Parameters

    Record.fieldNames: REC_TYPE,F1,CADTE,PERIOD,CTIME,F2,FILE_ID,F3,SEQUENCE,F4,REC_CNTR,F6

    Record.fieldFixedLengths: 4,1,10,1,9,1,11,1,1,1,5

    Record.endSeparator:'nl'

    Assumption: All the fields in the input text file are of fixed lengths. Also please note that it is mandatory to have fixed lengths for the fields or a separator between the fields

    Please let me know if this solved ur issue.

    Thanks and Regards,

    Krishna Sharma H

    Edited by: Krishna _XI on Dec 9, 2010 11:51 PM

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi kRishan

      I am getting the below error message in sender CC. Then after i used 'lastFieldsOptional' agian same error message giving still problem was not rectified.

      Conversion of file content to XML failed at position 0: java.lang.Exception: ERROR converting document line no. 1 according to structure 'Record':java.lang.Exception: Consistency error: field(s) missing - specify 'lastFieldsOptional' parameter to allow this.

      Thanks & Regards

      Sumith

  • author's profile photo Former Member
    Former Member
    Posted on Dec 10, 2010 at 11:56 AM
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.