| dasrcr |
|
Table of contents
Procedure
DASRCR ( DAS, remove comment records )
SUBROUTINE DASRCR ( HANDLE, N )
Abstract
Decrease the size of the comment area in a DAS file to reclaim
space freed by the removal of a specified number of comment
records.
Required_Reading
DAS
Keywords
DAS
FILES
UTILITY
Declarations
IMPLICIT NONE
INTEGER HANDLE
INTEGER N
Brief_I/O
VARIABLE I/O DESCRIPTION
-------- --- --------------------------------------------------
HANDLE I A DAS file handle.
N I Number of comment records to remove.
Detailed_Input
HANDLE is the handle of an existing DAS file opened for
comment area modification by DASOPC.
N is the number of records to remove from the end of
the comment area. of the specified file. If NCOMR
is the number of comment records present in the
file on input, then on output the number of comment
records will be MAX ( 0, NCOMR - N ).
Detailed_Output
None. See $Particulars for a description of the effect of this
routine.
Parameters
None.
Exceptions
1) If the input handle is invalid, an error is signaled by a
routine in the call tree of this routine.
2) If an I/O error occurs during the removal process, the error
is signaled by a routine in the call tree of this routine. The
DAS file will probably be corrupted in this case.
Files
See the description of the argument HANDLE in $Detailed_Input.
Particulars
This routine is used to reclaim freed space in the comment area
of a DAS file subsequent to removal of comments from the file.
Any existing directory records and data records will be shifted
up by N records.
This routine updates the file record of the specified DAS file
to reflect the addition of records to the file's comment area.
Also, the file summary obtainable from DASHFS will be updated to
reflect the addition of comment records.
The disk space occupied by the specified DAS file will not
decrease as a result of calling this routine, but the number of
records occupied by meaningful data will decrease. The useful
records in the file can be copied by DAS routines to create a
new, smaller file which contains only the meaningful data.
This routine may be used only on existing DAS files opened by
DASOPC.
The association of DAS logical addresses and data within the
specified file will remain unaffected by use of this routine.
Normally, SPICELIB applications will not call this routine
directly, but will remove comments by calling DASRC.
This routine has an inverse DASACR, which appends a specified
number of records to the end of the comment area.
Examples
C
C Open an existing DAS file for modification of
C the comment area. We'll presume that the file
C contains 20 comment records.
C
CALL DASOPC ( DAS, HANDLE )
C
C Remove the last 10 comment records from the file.
C
CALL DASRCR ( HANDLE, 10 )
C
C Close the file.
C
CALL DASCLS ( HANDLE )
Restrictions
1) The DAS file must have a binary file format native to the host
system.
Literature_References
None.
Author_and_Institution
N.J. Bachman (JPL)
J. Diaz del Rio (ODC Space)
W.L. Taber (JPL)
Version
SPICELIB Version 1.3.0, 02-JUN-2021 (JDR)
Added IMPLICIT NONE statement.
Edited the header to comply with NAIF standard.
SPICELIB Version 1.2.0, 05-FEB-2015 (NJB)
Updated to support integration with the handle
manager subsystem.
Cleaned up use of unnecessary variables and unneeded
declarations.
SPICELIB Version 1.0.0, 15-NOV-1992 (NJB) (WLT)
|
Fri Dec 31 18:36:11 2021