cancel
Showing results for 
Search instead for 
Did you mean: 

Variable Substuition not working

nisarkhan_n
Active Contributor
0 Kudos

Hi All

My input file structure is :

<b>1</b>0265032007000245026508003276081 +00159 +0000.00

<b>2</b>02600220079002220000087534120939X 87500123 -00198 OF-

On the reciver file adapter i am using the Variable substuition on the first field of input file.

filename = payload:MT_OB_InternalHours,1,Record,1,RecordType,1

File construction mode is: Append

I am suppose to get 2 outputfiles

1.txt

2.txt

But i am getting only 1 file "1.txt" with all the records in it.

Kindly let me about this.

regards

Nisar

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Khan,

Test your Interface mapping whether its populating no.of target interfaces or not.As per file structure was given below you have the two entries and you need to populate Two files. it means the message strucutre would be populate two times.Make sure that the inbound interface occurence would be 1..Unbound.f it so, then you are able to populate 2 files.According to this you need to modify your message mapping and in interface determination choose Enhanced instead of standarad option.

Hope it will helps..:)

Regards

Veera.

nisarkhan_n
Active Contributor
0 Kudos

Variable substuition will generate the filenames depending upon the field value which is reffered.

So your mapping will produce the single target but the depending upon the payload the filenames should be what i mean is if payload value is 1,2 then i should get 2 files 1.txt, 2.txt.

I hope i am not wrong in this understanding, any more clues?

santhosh_kumarv
Active Contributor
0 Kudos

Hi,

>>Variable substuition will generate the filenames depending upon the field value which is reffered.

Yes,

but for the variable defination defination that u have defined

filename = payload:MT_OB_InternalHours,1,Record,1,RecordType,1

If the Targed payload is like

MT_OB_InternalHours
 Record
   10265032007000245026508003276081 +00159 +0000.00 
   202600220079002220000087534120939X 87500123 -00198 OF-

only one file will be created with the name 1.txt.

So split your target message like

MT_OB_InternalHours
 Record
   10265032007000245026508003276081 +00159 +0000.00
MT_OB_InternalHours
 Record
   202600220079002220000087534120939X 87500123 -00198 OF-

So that u will get two files each with the name 1.txt & 2.txt.

Regards

San

there is a Way.

nisarkhan_n
Active Contributor
0 Kudos

Hi San

yes i have to create 2 MT in mapping to get 2 files, what i am doing is i am reading the input file by each row (recordset permessage = 1)

this should work right?

Former Member
0 Kudos

You'll have to split your message into two separate messages in order to create two files. Each message creates a file, and because you're sending two lines in one message, only one file is created.