Hmm ... that's not good news.
But everytime the crash occurs the file is written correctly. That means that the result shouldn't be NULL, doesn't it?
If a memory area is overwritten a diag could also crash, couldn't it?
This could be getting hard to find where the problem really comes from.
Yesterday I couldn't reproduce the problem after I've renamed the variable.
I'll try it this evening again.
Do you have any hints how to check if a memory area is overwritten?
Regards,
Pegamode.