on 08-26-2010 8:10 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Closing this thread as it appears there is no solution.
Thanks,
Matt
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.