Index of Functions: A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 
Index Page
daswfr

Table of contents
Procedure
Abstract
Required_Reading
Keywords
Declarations
Brief_I/O
Detailed_Input
Detailed_Output
Parameters
Exceptions
Files
Particulars
Examples
Restrictions
Literature_References
Author_and_Institution
Version

Procedure

     DASWFR ( DAS write file record )

     SUBROUTINE DASWFR ( HANDLE,
    .                    IDWORD,
    .                    IFNAME,
    .                    NRESVR,
    .                    NRESVC,
    .                    NCOMR,
    .                    NCOMC  )

Abstract

     Update the contents of the file record of a specified DAS file.

Required_Reading

     DAS

Keywords

     DAS
     FILES
     UTILITY

Declarations

     IMPLICIT NONE

     INTEGER               HANDLE
     CHARACTER*(*)         IDWORD
     CHARACTER*(*)         IFNAME
     INTEGER               NRESVR
     INTEGER               NRESVC
     INTEGER               NCOMR
     INTEGER               NCOMC

Brief_I/O

     VARIABLE  I/O  DESCRIPTION
     --------  ---  --------------------------------------------------
     HANDLE     I   DAS file handle.
     IDWORD     I   ID word.
     IFNAME     I   DAS internal file name.
     NRESVR     I   Number of reserved records in file.
     NRESVC     I   Number of characters in use in reserved rec. area.
     NCOMR      I   Number of comment records in file.
     NCOMC      I   Number of characters in use in comment area.

Detailed_Input

     HANDLE   is a file handle for a DAS file open for writing.

     IDWORD   is the `ID word' contained in the first eight
              characters of the file record.

     IFNAME   is the internal file name of the DAS file. The
              maximum length of the internal file name is 60
              characters.

     NRESVR   is the number of reserved records in the DAS file
              specified by HANDLE.

     NRESVC   is the number of characters in use in the reserved
              record area of the DAS file specified by HANDLE.

     NCOMR    is the number of comment records in the DAS file
              specified by HANDLE.

     NCOMC    is the number of characters in use in the comment area
              of the DAS file specified by HANDLE.

Detailed_Output

     None.

Parameters

     None.

Exceptions

     1)  If the handle passed to this routine is not the handle of an
         open DAS file, an error is signaled by a routine in the call
         tree of this routine.

     2)  If the specified DAS file is not open for write access, an
         error is signaled by a routine in the call tree of this
         routine.

     3)  If the attempt to read the file record fails, the error
         SPICE(DASREADFAIL) is signaled.

     4)  If the file write attempted by this routine fails, the error
         SPICE(DASFILEWRITEFAILED) is signaled.

Files

     See the description of HANDLE under $Detailed_Input.

Particulars

     This routine provides a convenient way of updating the internal
     file name of a DAS file.

     The `ID word' contained in the file record is a string of eight
     characters that identifies the file as a DAS file and optionally
     indicates a specific file format, for example, `EK'.

Examples

     1)  Update the internal file name of an existing DAS file.

            C
            C     Open the file for writing.
            C
                  CALL DASOPW ( FNAME, HANDLE  )

            C
            C     Retrieve the ID word and current reserved record
            C     and comment area record and character counts.
            C
                  CALL DASRFR ( HANDLE,
                 .              IDWORD,
                 .              IFNAME,
                 .              NRESVR,
                 .              NRESVC,
                 .              NCOMR,
                 .              NCOMC  )

            C
            C     Set the internal file name and update the file
            C     with it.
            C
                  IFNAME = 'New internal file name'

                  CALL DASWFR ( HANDLE,
                 .              IDWORD,
                 .              IFNAME,
                 .              NRESVR,
                 .              NRESVC,
                 .              NCOMR,
                 .              NCOMC  )

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)
     K.R. Gehringer     (JPL)
     W.L. Taber         (JPL)
     F.S. Turner        (JPL)

Version

    SPICELIB Version 3.1.1, 02-JUN-2021 (JDR)

        Edited the header to comply with NAIF standard.

    SPICELIB Version 3.1.0, 05-FEB-2015 (NJB)

        Updated to support integration with the handle
        manager subsystem.

    SPICELIB Version 3.0.0, 11-DEC-2001 (FST)

        This routine was modified to accommodate the preservation
        of the FTP validation and binary file format strings that
        are not part of the DAS file record.

    SPICELIB Version 2.0.0, 27-OCT-1993 (KRG)

        Removed references to specific DAS file open routines in the
        $Detailed_Input section of the header. This was done in order
        to minimize documentation changes if these open routines ever
        change.

        Added a check of FAILED after the call to DASHLU which will
        check out and return if DASHLU fails. This is so that when in
        return mode of the error handling the READ following the call
        to DASHLU will not be executed.

        Reworded some of the descriptions contained in the
        $Detailed_Output section of the header so that they were more
        clear.

    SPICELIB Version 1.0.0, 24-NOV-1992 (NJB) (WLT)
Fri Dec 31 18:36:12 2021