cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Variable Substitution Receiver Adapter

former_member182004
Contributor
0 Kudos

Hi,

I need to use a dynamic filename so I'm using the variable substitution in my receiver adapter. BUT, the filename can't appear in the file. So i used this blog in reference -->

The PROBLEM is I still get and extra blank line in the file. How can I eliminate this extra line?

Thanks in advance.

Using XI 7.0

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member182004
Contributor
0 Kudos

OK. I fixed it.

I added Message Mapping and a UDF that adds the file name in the DynaicConfiguration of the message.

You can close the thread.

Thanks anyway.

Former Member
0 Kudos

Hi Juan

can you share the structure to understand more.

check with FCC parameter the new line you are creating in file.

Thanks

Gaurav

former_member182004
Contributor
0 Kudos

Hi Gaurav,

Data Type:

Lines

Line

Config

FileName

XML - example:

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

<nr1:MT_TP_TipoCambio_Detalle_ECC_Req xmlns:nr1="urn:erplatam/tipocambio:tp:ecc">

<Lines>

<Line>USDSOL0000000000003.10000013-09-200813-09-2008V</Line>

</Lines>

<Lines>

<Line>USDSOL0000000000002.50000014-09-200814-09-2008V</Line>

</Lines>

<Config>

<FileName>SIGMA_TCSAP_F081031.DAT.TXT</FileName>

</Config>

</nr1:MT_TP_TipoCambio_Detalle_ECC_Req>

Output - File, has 3 lines should have only 2:

USDSOL0000000000003.10000013-09-200813-09-2008V

USDSOL0000000000002.50000014-09-200814-09-2008V

FCC parameters:

RecordSet Structure: Lines,Config

Lines.fieldSeparator 'nl'

Lines.endSeparator 'nl'

Config.fieldSeparator 'nl'

Config.endSeparator 'nl'

Thanks in advance!

Former Member
0 Kudos

Hi Juan

There is no other value coming in Config then file name

You can try with this


Lines.fieldSeparator 'nl'
Lines.endSeparator 'nl'
Config.fieldSeparator 'nl'
Config.endSeparator 'nl'
Config.fieldFixedLengths 0
Config.fixedLengthTooShortHandling Cut

Thanks

Gaurav

former_member182004
Contributor
0 Kudos

Sorry, I forgot to include them in the post I do have those 2 lines in the FCC:

Config.fieldFixedLengths 0

Config.fixedLengthTooShortHandling Cut

With this I get a blank line at the end of the file.

Former Member
0 Kudos

Hi

please change the structure



Lines
    Line
Config
FileName

make Lines, Config, FileName at same node

and


FCC parameters:
RecordSet Structure: Lines,Config,FileName

Lines.fieldSeparator 'nl'
Lines.endSeparator 'nl'
Config.fieldSeparator 'nl'
Config.endSeparator 'nl'
FileName.fieldFixedLengths 0
FileName.fixedLengthTooShortHandling Cut

Thanks

Gaurav

former_member182004
Contributor
0 Kudos

I changed the Data type to:

Lines

Line

FileName

Lines and FileName at same level

FCC parameters:

RecordSet Structure: Lines,FileName

Lines.fieldSeparator 'nl'

Lines.endSeparator 'nl'

FileName.fieldFixedLengths 0

FileName.fixedLengthTooShortHandling Cut

But now the file name appears always. Like if the FCC parameters isn't working!

Former Member
0 Kudos

Hi Juan

I just replicated and it is working with your previous structure itself


Lines
    Line1
    Line2
Config
    FileName

Parameter i gave is same as you did


FCC parameters:
RecordSet Structure: Lines,Config
 
Lines.fieldSeparator ,
Lines.fieldFixedLengths 6,6
Config.fixedLengthTooShortHandling Ignore
Lines.endSeparator 'nl'
Config.fieldFixedLengths 0
Config.fixedLengthTooShortHandling Cut

Not even required to change the structure. Check with the Config.fieldSeparator you have kept 'nl' this allows creating a new line and where you are keeping length 0 which creates blank line. I think change this parameter can help you.

Thanks

Gaurav

former_member182004
Contributor
0 Kudos

Thanks Gaurav for your responds, but I'm still with the same problem.

I went back to the original structure


Lines
   Line
Config
   FileName

played around with the FCC Parameters, even the one on your last post, which left the name on the file.

I left it so the file name doesn't appear in the content, but leaves a blank line


FCC parameters:
RecordSet Structure: Lines,Config
 
Lines.fieldSeparator 'nl'
Lines.endSeparator 'nl'
Config.fieldFixedLengths 0
Config.fixedLengthTooShortHandling Cut

Any other ideas?

Thanks!