Skip to Content
author's profile photo Former Member
Former Member

Reciever File Adapter - Temp File Name Scheme using Variable Substitution

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 27, 2010 at 03:29 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 23, 2010 at 01:20 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 23, 2010 at 02:37 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 13, 2010 at 08:05 PM

    Closing this thread as it appears there is no solution.

    Thanks,

    Matt

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.