Hello Mike,
thank you for your answer.
To be honest I was expecting an url for bug submission.
Because earlier my company had some kind of development support that I could connect by e-mail.
There I have reported dozen of OpenVMS bugs that had been solved. 
miker_alpha wrote:What is the original problem?
What is an "unusual organization"?
More details?
You are right that C does not have default support, but there are very neat libraries provided along with C compiler that does the job. The problem is that there are two approach:
1. using native VMS SYS$QIO system calls. This is the right approach and this works perfect.
2. another method is using standard C library calls like open(), read() fopen, fread etc. At the bottom these C functions will use SYS$QIO system calls as well-but at the top they provide a nice, unix compatible programming environment for the developer.
Unfortunately, I need to solve my problem with method 2. because the code is designed and written to be portable. (of course I'm talking about Vim)
The problem is that I have got a file that Vim truncates - LSE reads well.
So I made a two test programs one that uses VMS system calls and another that uses standard C calls - and guess what. The second test failed.
This points to a C RTL bug.
The file organization is he following:
- Code: Select all
- SYSTEM@alpha$ sho def
 DKA0:<WORK>
 SYSTEM@alpha$ ana/rms incomplete.log
 
 Check RMS File Integrity                     24-JAN-2008 22:59:33.03   Page 1
 DKA0:<WORK>INCOMPLETE.LOG;1
 
 
 FILE HEADER
 
 File Spec: DKA0:<WORK>INCOMPLETE.LOG;1
 File ID: (64576,4,0)
 Owner UIC: [1,1]
 Protection:  System: RWED, Owner: RWED, Group: RE, World: R
 Creation Date:   24-JUL-2007 11:23:20.30
 Revision Date:    6-SEP-2007 09:58:19.02, Number: 4
 Expiration Date: none specified
 Backup Date:     none posted
 Contiguity Options:  none
 Performance Options: none
 Reliability Options: none
 Journaling Enabled:  none
 
 
 RMS FILE ATTRIBUTES
 
 File Organization: sequential
 Record Format: variable-with-fixed-control
 Record Attributes:  print
 Maximum Record Size: 0
 Longest Record: 145
 Fixed Control Size: 2
 Blocks Allocated: 144, Default Extend Size: 0
 End-of-File VBN: 101, Offset: %X'00F4'
 File Monitoring: disabled
 File Length Hint (Record Count):    -1 (invalid)
 File Length Hint (Data Byte Count): -1 (invalid)
 Global Buffer Count: 0
 
 
 The analysis uncovered NO errors.
 
 
 ANA/RMS incomplete.log
 
This is a nice file... unfortunately C sees the EOF some 10 lines before the real EOF.
... and this is a major issue.
The only luck in this issue is that this record organization Record Format: variable-with-fixed-control with Fixed Control Size: 2 is that rare, that in fact, this is the first this kind of file that I have seen.  
Any help would be appreciated.
Thank you in advance.