cancel
Showing results for 
Search instead for 
Did you mean: 

File Sender adapter not reading the first line

Former Member
0 Kudos

Hi,

I have a scenario configured from file to jdbc adapter.

However, I found a problem in my file sender adapter. My file adpater always not picking up the first line from my text even I have set the 'Document Offset' to 0.

Any Ideas? Thanks.

Regards,

Pua

Accepted Solutions (0)

Answers (3)

Answers (3)

justin_santhanam
Active Contributor
0 Kudos

Pua,

Can u reply back the content conversion parameters u used in comm.channel it will be easy for us to identify

Best regards,

raj.

Former Member
0 Kudos

Hi Raj,

Here is my content conversion settings in comm. channel :-

Recordset Structure = Header1,1,Header2,1,Details,*

Recordset Sequence = Ascending

Key Field Name = KF

-


Header1.fieldSeparator = |

Header1.endSeparator = 'nl'

Header1.fieldNames = KF, Nama, KWSP, NoGaji, Bulan

Header1.keyFieldValue = H1

Header1.keyFieldInStructure = Ignore

Header2.fieldSeparator = |

Header2.endSeparator = 'nl'

Header2.fieldNames = KF, IC

Header2.keyFieldValue = H2

Header2.keyFieldInStructure = Ignore

Details.fieldSeparator = |

Details.endSeparator = 'nl'

Details.fieldNames = KF, Jenis, No, Deskripsi, Jumlah

Details.keyFieldValue = D

Details.keyFieldInStructure = Ignore

ignoreRecordsetName = false

-


This is the sample text file that I used:-

H1|PUA17 |A0016508 |10000021|09/2007

H2|ABC0002

D|P|0001|Gaji Pokok | 2,744.09

D|D|0002|Denda | 2,000.00

D|P|0003|Elaun | 2,000.00

null

null

Former Member
0 Kudos

Fei,

In your content conversion you have given:

ignoreRecordsetName = false

Change it to true and check once again. It should go through.

Regards,

---Satish

Former Member
0 Kudos

Hi Satish,

I have tried both ignoreRecordsetName = true/false it is same.

I dun think the problem is due to ignoreRecordsetName param as the input file I currently have is a text file (.txt) but not xml file.

Anyway thanks for many helps from you guys

Former Member
0 Kudos

hi pua,

is this text file ur complete input file? coz the info here in this file is getting " completely and correctly" converted to the second payslip node.

if its not then plz provide ur input file with the first lines...

regards,

latika

Former Member
0 Kudos

Hi Latika Sethi,

My complete input text file is as below, it contains only 2 testing records:-

H1|DIZ1 |A0016507 |10000020|09/2007

H2|ABC0001

D|P|0001|Gaji Pokok | 1,000.09

D|D|0002|Denda | 1,000.00

D|P|0003|Elaun | 1,000.00

H1|PUA1 |A0016508 |10000021|09/2007

H2|ABC0002

D|P|0001|Gaji Pokok | 2,744.09

D|D|0002|Denda | 2,000.00

D|P|0003|Elaun | 2,000.00

After the message mapping, I found the pipeline existed in sxmb_moni as below:-

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

<ns:mt_rmp03B_filejdbc_sender xmlns:ns="urn:rmp03:pdrm:ips:jdbcjdbc">

<PaySlip>

..<Header2>

.... <IC>ABC0001</IC>

.. </Header2>

.. <Details>

.... <Jenis>P</Jenis>

.... <No>0001</No>

.... <Deskripsi>Gaji Pokok</Deskripsi>

.... <Jumlah>1,000.09</Jumlah>

.. </Details>

</PaySlip>

<PaySlip>

.. <Header1>

.... <Nama>PUA1</Nama>

.... <KWSP>A0016508</KWSP>

.... <NoGaji>10000021</NoGaji>

.... <Bulan>09/2007</Bulan>

.. </Header1>

.. <Header2>

.... <IC>ABC0002</IC>

.. </Header2>

.. <Details>

.... <Jenis>P</Jenis>

.... <No>0001</No>

.... <Deskripsi>Gaji Pokok</Deskripsi>

.... <Jumlah>2,744.09</Jumlah>

.. </Details>

</Payslip>

There are 2 payslips as for the top payslip node...Header1 tag is missing. It means that during the file sender step....the first line of my record which is :-

"H1|DIZ1 |A0016507 |10000020|09/2007"

is not read into the xi pipeline. Basically this is the problem i faced.

Has somebody facing the same problem before? Currently I have no choice but moved the First line of the text into Second line and left the first line of the text become null/ empty line. As such both records can be successfully read by the XI.

However what I wondered is sometimes clients will do insert the records into the first line and this might made some data loss.

Thanks...

Former Member
0 Kudos

Hi Pua,

<i>After the message mapping, I found the pipeline existed in sxmb_moni as below</i> - just check in sxmb_moni for this msg, what is the incoming msg payload...

if the incoming msg payload has your first line data, then the problem is in your mapping........rectify your mapping and you will get your first line of data.....

Thanks,

Rajeev Gupta

Former Member
0 Kudos

Hi Rajeev,

The payload that I posted above is exactly what I get from the sxmb_moni...first Header1 not found.

If I moved the source file - first line data to the second line, my incoming msg payload will show in sxmb_moni with the Header1..so I think the message mapping is allright actually.

Thanks...

Former Member
0 Kudos

Hi Pua,

Where did you copy the payload from ? Did you copy it from the first step?

no reason why the first line will be ignored.

Would be better if you can take a screenshot of your file adapter configuration , xml payload and update in some website. like http://www.flickr.com/

Regards,

Sumit

Message was edited by:

Sumit Khetawat

Former Member
0 Kudos

Hi Sumit,

Yes..copied from payload in the first step of INBOUND MESSAGE.

ya...the behaviour so strange that I only founded that during multiple testing. As first I thought I have done it right, only found out this when I checked the records in receiver database mismatched and back traced to check in sxmb_moni.

Thanks....

Former Member
0 Kudos

hi pua,

seems strange. i just tried the same scenario like urs n it wrks fine...!!!

one more thing-- remove the parameter Document Offset , if its there.

regards,

latika.

Former Member
0 Kudos

Hi Lathika Sethi,

That's great...I will keep on trying.

Anyways thanks for the effort!

Former Member
0 Kudos

Hi Sumit,

I've capture and upload the screen to flickr.

1. This is the source file

http://www.flickr.com/photos/9398115@N06/638025626/

2. This is the upper part of my configuration

http://www.flickr.com/photos/9398115@N06/638025636

3. This is the lower part of my configuration...however i couldnt capture the whole screen out as it is in the scroll mode

http://www.flickr.com/photos/9398115@N06/638025644

4. And lastly this is the sxmb_moni - Incoming msg payload that I get with no Header1 node in the PaySlip node

http://www.flickr.com/photos/9398115@N06/638025658

Thanks....

Former Member
0 Kudos

Hi Pua,

I am facing the same issue in my file content conversion.

Have you been able to find a solution?

Also, for us the problem occurs when we try to change the file encoding in the communication channel. Before that it was working fine.

One work around is to insert a newline (blank line) as the first line of the document (source file).

Thanks,

Samuel

Former Member
0 Kudos

Pua,

Can you please post the error what you are getting on your sender communication channel in adapter monitoring?

Regards,

---Satish

Former Member
0 Kudos

Hi Satish,

Actually there is no error given in my communication channel in adapter monitoring. It only gaves me 'Processing finished successfully' message.

However if I checked the pipeline in sxmb_moni, this is what I have:-

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

<ns:mt_rmp03B_filejdbc_sender xmlns:ns="urn:rmp03:pdrm:ips:jdbcjdbc">

<PaySlip>

..<Header2>

.... <IC>ABC0001</IC>

.. </Header2>

.. <Details>

.... <Jenis>P</Jenis>

.... <No>0001</No>

.... <Deskripsi>Gaji Pokok</Deskripsi>

.... <Jumlah>1,000.09</Jumlah>

.. </Details>

</PaySlip>

<PaySlip>

.. <Header1>

.... <Nama>PUA1</Nama>

.... <KWSP>A0016508</KWSP>

.... <NoGaji>10000021</NoGaji>

.... <Bulan>09/2007</Bulan>

.. </Header1>

.. <Header2>

.... <IC>ABC0002</IC>

.. </Header2>

.. <Details>

.... <Jenis>P</Jenis>

.... <No>0001</No>

.... <Deskripsi>Gaji Pokok</Deskripsi>

.... <Jumlah>2,744.09</Jumlah>

.. </Details>

...........................................Etc

As you can see the Header1 Information is not found...whereby Header1 is the first line of text in my file.

Thanks..

Message was edited by:

Pua Ming Fei

Message was edited by:

Pua Ming Fei

Former Member
0 Kudos

Hey

dont put Document Offset at all in ur FCC,also set ignoreRecordsetName to False

thanx

Ahmad

Former Member
0 Kudos

Hi Ahmad,

Thanks for reply.

I've tried what you told me to remove the Document Offset and set ignoreRecordsetName to False, but no lucks... i can only see the pipeline started from second line to end in my sxmb_moni.