home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!news.claremont.edu!nntp-server.caltech.edu!SOL1.GPS.CALTECH.EDU!CARL
- From: carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick)
- Newsgroups: comp.os.vms
- Subject: Re: VAX c
- Date: 27 Dec 1992 07:41:27 GMT
- Organization: HST Wide Field/Planetary Camera
- Lines: 53
- Distribution: world
- Message-ID: <1hjmn7INN34t@gap.caltech.edu>
- References: <24DEC199220084219@spades.aces.com> <Bzt6EF.Est@dale.cts.com>,<1992Dec26.100030.299@rlgsc.com>
- Reply-To: carl@SOL1.GPS.CALTECH.EDU
- NNTP-Posting-Host: sol1.gps.caltech.edu
-
- In article <1992Dec26.100030.299@rlgsc.com>, gezelter@rlgsc.com writes:
- >I will admit that the following solution is a bit of hitting a
- >small ant hill with a large explosive, but ...
-
- If memory serves, it's even worse than that!
-
- >When the time expires, close the file. Then re-open it in append
- >mode. This will ensure that all of your buffers are flushed out
- >to the disk.
-
- I tried that once. Maybe it had to do with the way the file dealt with
- records, but what I ended up with with was a file that had *ONE* record per
- block. Not what one would want.
-
- Now, DEC support recommended an "undocumented and unsupported" routine. I'm
- 99.9999999999999999999999% certain that this routine was one that returned the
- RAB associateded with a file id. Given that, the worst that could happen if
- you tried to use it (i.e., ran the routine, then tried to do a SYS$FLUSH on the
- RAB at the address returned) would be that you'd get a status complaining about
- an invalid stream identifier (OK, OK, there's a [n infitesimal] chance that if
- the routine failed to work properly, it would return the address of SOMETHING
- that looked like a valid RAB, and who knows what would happen then? But do you
- have any idea what the odds are against that?)
-
- >If I remember correctly from the original post, the application
- >in question is not a high bandwidth application. The periodic
- >close/reopen cycle should not appreciably increase your CPU
- >consumption.
-
- CPU's not the problem here. The problem is that every time you do it, you use
- up another block on the disk.
-
- >I hope that the above is helpful. If I have been unclear, or if I
- >can be of further assistance, please feel free to contact me via
- >Email or phone.
-
- Please note that I'm not trying to put Bob down; his solution WILL work; but
- it uses up lots of disk space. The better alternative is to use the
- "undocumented and unsupported" function that returns the RAB associated with
- the file descriptor, and do a $FLUSH on that.
-
- IMNSHO, there ought to be a documented and supported (though perhaps
- discouraged) way to get the RAB associated with a file descriptor [anybody from
- DEC listening? You guys've probably got what you think is a good reason for
- not doing this: care to share?])
- --------------------------------------------------------------------------------
- Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL
-
- Disclaimer: Hey, I understand VAXen and VMS. That's what I get paid for. My
- understanding of astronomy is purely at the amateur level (or below). So
- unless what I'm saying is directly related to VAX/VMS, don't hold me or my
- organization responsible for it. If it IS related to VAX/VMS, you can try to
- hold me responsible for it, but my organization had nothing to do with it.
-