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: Apending a file at the end of mail.
- Date: 23 Dec 1992 13:30:11 GMT
- Organization: HST Wide Field/Planetary Camera
- Lines: 39
- Distribution: world
- Message-ID: <1h9pl3INN1c9@gap.caltech.edu>
- References: <21DEC199210505504@spades.aces.com> <1h6a0uINN9ks@gap.caltech.edu> <22DEC199209022524@spades.aces.com>,<1992Dec23.063743.3368@organpipe.uug.arizona.edu>
- Reply-To: carl@SOL1.GPS.CALTECH.EDU
- NNTP-Posting-Host: sol1.gps.caltech.edu
-
- In article <1992Dec23.063743.3368@organpipe.uug.arizona.edu>, vance@lpl.arizona.edu (Vance Haemmerle x4021) writes:
- > Anyway, here's someone's question I couldn't answer after spending
- > lots of time with the DOC CD-ROM. Is there a system service or
- > Run-Time Library routine that returns the amount of blocks allocated
- > to a file? Something like stat() in C, but the allocated space, not
- > the used space. I hope the answer doesn't involve reading the
- > directory file format manulally or seting up RMS control structures.
-
- Ah, Vance. Are you trying to involve yourself in my and Ehud's rather amiable
- flamewar? Of did you really not know about the F$FILE lexical, with the "ALQ"
- item (and the equivalent field in the FAB block).
-
- From DCL you can:
- $ WRITE SYS$OUTPUT F$FILE(file_name, "ALQ")
-
- In a C program, you can (for LOGIN.COM in this case, but I'm sure you can
- figure out how to extend things):
- #
- include rms
-
- main()
- { struct FAB my_fab;
-
- my_fab = cc$rms_fab;
- my_fab.fab$l_fna = "LOGIN.COM";
- my_fab.fab$b_fns = strlen(my_fab.fab$l_fna);
- SYS$OPEN(&my_fab);
- SYS$CLOSE(&my_fab);
- printf("%d\n", my_fab.fab$l_alq);
- }
-
- --------------------------------------------------------------------------------
- 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.
-