cancel
Showing results for 
Search instead for 
Did you mean: 

Reciever File Adapter - Temp File Name Scheme using Variable Substitution

Former Member
0 Kudos

How can I create a temporary file that uses variable substitution?

We are having a problem with files merging when we write files using the "Use Temporary File" setting on the FIle Adapter. So two independent files are merging into a single file. We are not using the "Append" setting.

We would like to use a Temp File Name Scheme that would append the message id onto the temporary file name.

Using variable substitution we created a msgid variable. When added to the temporary file name using %msgid% the temporary file name is created with %msgid% in the name instead of the actual message id. We put the variable into the "File Name Scheme" as well and the end completed file used the message id in the name.

Any Ideas?

Thanks,

Matt

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI Matthew,

Why are you adding the message id into the temporary file??

I understand that you want the output of the filename to contain message id .. and hence you are using variable substitution for the same.

Temporary file name will anyways get overwritten by the actual file name (here the actual filename will be using variable substituion).

So i suggest to achieve your scenario you can add any name in the temporary file and maintain the desired filename you require as output in the variable subsititution.

Temporary File Name option actually acts as a lock - unlock mechanism from PI side while the file is getting written to the file server so that while PI is writting the file no third party application batch program picks it up.

I hope this helps.

Cheers

Dhwani

Answers (3)

Answers (3)

Former Member
0 Kudos

Closing this thread as it appears there is no solution.

Thanks,

Matt

Former Member
0 Kudos

Hello,

Can you see if you have checked the option "overwrite existing file"? if so try unchecking it.

the config would be something like file construction mode= create overwrite existing file=NO put file- use temperary file

temperary file name scheme= tmp.

regards,

francis

Former Member
0 Kudos

When we activated this we had a couple files every day getting merged into one file. I assume this means as one temp file was written another process started and appended its document into the current temp file. Which created a mixed file.

Anyone have a solution for this?

Thanks,

Matt