cancel
Showing results for 
Search instead for 
Did you mean: 

how can you avoid the empty line?

Former Member
0 Kudos

hi all,

i looked around quite a bit and didn't found an answer to this very common problem.

i used this blog:

for using a dynamic filename.

the problem i get is the file adapter create a empty line instead of the FILENODE which i need to be suppressed and not written to the file.

is it possible?

regards,

roi grosfeld

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

hi,

thanks for the fast reply...

this seem really complicated and i don't wanna spend much time on it.

i think the best choice will be to pass the filename in the data type of my data.

it will repeat all over the rows and i will get it from the first row.

kind of ugly solution but this is the fastest one i guess.

regards,

roi grosfeld

Former Member
0 Kudos

hi,

in the last couple of hours i tryed to do what the thread say and i got the idea..

and a really nice one indeed.

the problem is that my scenario isn't File->XI->File so the sender file adapter can't create the FileName in the message header.

is it possible to only create the parameters in the target for the reciever file adapter?

if so can i test it in the integration builder (can i add the filename to the configuration using the test option in the message mapping?)?

regards,

roi grosfeld

Former Member
0 Kudos

Hi,

Well thats good question. you can't test it in test tab of mapping.

It will give you exception like something below

RuntimeException in Message-Mapping transformation: Runtime exception

Here you can create the file name in Mapping either by using various APIs as well as Sender side filed values and can pass to the UDF that you will create for dynamic filename.

File with same name will be created. This is specific to DynamicConfiguration class which deals with the values at runtime.

Thanks

Swarup

Former Member
0 Kudos

hi,

sorry but still didn't work... now i get the empty line if the end of the file instead of in start of the file

FILENODE was first in my message type and the RECORDSET was second.

regards,

roi grosfeld

Former Member
0 Kudos

Hi,

I hope you might have used it in below way,

FILENODE.fixedLengthTooShortHandling Cut

FILENODE.fieldFixedLengths 0

Recordset.fieldSeparator '0x0D''0x0A'

and the Message type is as below,

Root---->

-


FILENODE

-


RECORDSET

This scenario have worked successfully in one of my previous project.

Thanks

Swarup

Former Member
0 Kudos

hi,

i am sorry but i don't have a field seperator.

i am using fieldFixedLength... maybe this doesn't work when using this parameter?

regards,

roi grosfeld

Former Member
0 Kudos

Hi,

it will not work with fieldFixedLength.

then you need to go with DynamicFileName.

Refer the code from below link given by Bhavesh Kantilal

Thanks

Swarup

Former Member
0 Kudos

Hi,

Try to change the sequence as FILENODE and RECORDSET structure in receiver Message Type (reverse way).

Thanks

Swarup