In order for this site to work correctly, and for us to improve the site, we need to store a small file (called a cookie) on your computer.
By continuing to use this website, you agree to our cookies and privacy policy.
  
Home page Home page Home page Home page
Pixel
Pixel Header R1 C1 Pixel
Pixel Header R2 C1 Pixel
Pixel Header R3 C1 Pixel
Pixel

QTIPS - Truncating DOS Files

Richard Guise informs us of an interesting use for the OSBWRITE command. It seems that if you want to truncate a file at a fixed length the easiest way is to OSBWRITE a null onto the character position to truncate at. Thus if a file were 10 MB in length and only the first 5 MB were required one would


0001       OSBWRITE "" on File_Var at 5120000

(Volume 4, Issue 1, Page 4)
Pixel
Pixel Footer R1 C1 Pixel
Pixel
Pixel
Pixel