* File sizes using Pascal on VMS...
@ 1993-06-17 14:54 Douglas B. Dodson
1993-06-18 8:10 ` fairfield
0 siblings, 1 reply; 2+ messages in thread
From: Douglas B. Dodson @ 1993-06-17 14:54 UTC (permalink / raw)
Hello all,
We have two situations which have presented us with a small problem. This
problem deals with using Pascal on a DEC VAX 4000 series running the latest
version of VMS. First the situations:
1) A file exists on the disk and we wish to obtain the file size (both actual
and allocated). We would like to do this without spawning off a command file
and parsing the output. We have looked for a system call or library routine
but can't seem to find any to fit the bill. The file on the disk is closed and
the priveleges should not be a factor. Sounds like a simple problem, yet we
can't find an "easy" way to do it.
2) The other situation is that we are copying a file to disk and wish to know
the percent copied at various stages along the way. VMS subtracts off the
entire size of the file even before the copying is complete. Since this file
is being copied, this problem is a little more difficult.
Remember we need to do this using Pascal on a VMS machine. If anybody can
provide any help, it would be greatly appreciated. Thanks!
- Doug -
--
Douglas B. Dodson Internet: DBD@ICF.HRB.COM
HRB Systems, Inc.
State College, PA USA
16804
Disclaimer!
===========
Any ideas or opinions expressed here do not necessarily reflect the ideas or
opinions of HRB.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: File sizes using Pascal on VMS...
1993-06-17 14:54 File sizes using Pascal on VMS Douglas B. Dodson
@ 1993-06-18 8:10 ` fairfield
0 siblings, 0 replies; 2+ messages in thread
From: fairfield @ 1993-06-18 8:10 UTC (permalink / raw)
In article <1993Jun17.095412.20335@icf.hrb.com>,
dbd@icf.hrb.com (Douglas B. Dodson) writes:
> Hello all,
>
> We have two situations which have presented us with a small problem. This
> problem deals with using Pascal on a DEC VAX 4000 series running the latest
> version of VMS. First the situations:
>
> 1) A file exists on the disk and we wish to obtain the file size (both actual
> and allocated). We would like to do this without spawning off a command file
> and parsing the output. We have looked for a system call or library routine
> but can't seem to find any to fit the bill. The file on the disk is closed and
> the priveleges should not be a factor. Sounds like a simple problem, yet we
> can't find an "easy" way to do it.
The "easy" way is to use SYS$OPEN and SYS$CLOSE with a properly constructed
FAB. :-) The total space taken on disk (allocated) is at FAB$L_ALQ,
while what you call the "actual" size is the EBK (End of file BlocK) which
is gotten by chaining an XAB defined by $XABFHCDEF to the FAB. BTW, the
documentation on these things is (I believe) in the I/O Users Reference
Manual rather than in any of the RTL's or SS references.
OK, it's simple if you've done it once before :-} I've got an example
program written in Fortran which is too long to post, but which I'll be
happy to send to anyone whose interested. It also retrieves all four
of a file's date fields.
-Ken
--
Dr. Kenneth H. Fairfield | Internet: Fairfield@Slac.Stanford.Edu
SLAC, P.O.Box 4349, MS 98 | DECnet: 45537::FAIRFIELD (45537=SLACVX)
Stanford, CA 94309 | FAX: (415) 926-4335
----------------------------------------------------------------------------
These opinions are mine, not SLAC's, Stanford's, nor the DOE's...
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1993-06-18 8:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1993-06-17 14:54 File sizes using Pascal on VMS Douglas B. Dodson
1993-06-18 8:10 ` fairfield
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox