When writing files, I have a situation where writing '.txt' file works alright but '.html' fails with above error.
Any specific reason and how can this be solved.
Thanks,
Venky
Can you provide more information on this? What ABL code are you using? Can you create a '.html' file in this same directory from outside OE?
OS and Progress version would be a help too please.
Like the others have said we need to know exactly what version of Progress and OS you are running. If you are running anything fairly recent then 4 digit extensions should not be an issue.
We need to know the exact file name and path you are trying to write to and if you can write other extensions to that same path.
Version is > 11.
code is
s-filename = 'TestFile' + "." + s-fomat:screen-value.(this is '.txt' or '.htm')
'output to value(s-filname) no-convert.'
This is a piece of code that is writing to a default working directory.
Would it be a case of second session trying to write to the same file before first session is complete writing. I say this because the file name is always TestFile.'extension'.
Yes, I do have write access to this folder.
Possibly. If you have multiple sessions sharing the same folder then it is likely.
Writing to the same file name without doing some kind of overwrite protection is generally considered "a bad thing". You can put a SEARCH(s-filename) in your code to see if the file is there or not and react appropriately.
s-filename = 'TestFile' + "." + s-fomat:screen-value.(this is '.txt' or '.htm')
Regarding TestFile..txt - this is not a problem. s-format:screen-value is only 'htm' or 'txt'
I tried simultanious writing to same file(writing to same file before closing output stream) scenario on editor and it works alright
With the same userid this may be correct depending on your OS. The file of course will likely be garbage since only one can "win".
We are missing part of the puzzle here as to why you are getting this error. Obviously something is different with the environment or code than this simple example.