From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=BAYES_00,FROM_ADDR_WS autolearn=no autolearn_force=no version=3.4.5-pre1 Date: 22 Sep 92 20:21:47 GMT From: pa.dec.com!nntpd2.cxo.dec.com!bonmot!wallace@decwrl.dec.com (Richard Wal lace) Subject: Reducing Size of Files with direct_io Message-ID: <1992Sep22.202147.8873@nntpd2.cxo.dec.com> List-Id: simonson@cs.washington.edu (Kevin Simonson) writes: : With package "direct_io" (dealt with on pages 14-7 to 14-9 of the : LRM), any element of a file can be modified in any way, additional elements : can be added onto the end of the file, and in addition to this the file can : even be deleted. : : It strikes me as being a very flexible way to handle a file, but : there is one feature that it seems to lack. The size of the file can be : increased by writing past the end, but I can't find any way to DECREASE : the size of the file, without outright deleting it. Does anyone know how : such a thing could be accomplished? Thanks in advance. : : ---Kevin Simonson <> The DIRECT_IO package is really a basic interface to indexed sequential operations on a file and hence it is up to the file system of your run-time host how indexed files are managed. I know that element deletions have to have VAX/VMS RMS operations done on them in VAX Ada to flush file operations so that an index file increases and decreases correctly. My suggestion is to close the file and reopen to keep pure Ada programming. Remember to keep the current index between closes and opens! Hope this helps! Richard Wallace Digital Equipment Corporation 301 Rockrimmon Blvd. South CXO2-1/7A Colorado Springs, CO 80919-2398 (719)548-2792 "The opinions expressed are my own, Unlce Ken or Uncle Bob may, or may not, agree with me.