daswfr |
Table of contents
ProcedureDASWFR ( DAS write file record ) SUBROUTINE DASWFR ( HANDLE, . IDWORD, . IFNAME, . NRESVR, . NRESVC, . NCOMR, . NCOMC ) AbstractUpdate the contents of the file record of a specified DAS file. Required_ReadingDAS KeywordsDAS FILES UTILITY DeclarationsIMPLICIT NONE INTEGER HANDLE CHARACTER*(*) IDWORD CHARACTER*(*) IFNAME INTEGER NRESVR INTEGER NRESVC INTEGER NCOMR INTEGER NCOMC Brief_I/OVARIABLE 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_InputHANDLE 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_OutputNone. ParametersNone. Exceptions1) 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. FilesSee the description of HANDLE under $Detailed_Input. ParticularsThis 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'. Examples1) 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 ) Restrictions1) The DAS file must have a binary file format native to the host system. Literature_ReferencesNone. Author_and_InstitutionN.J. Bachman (JPL) J. Diaz del Rio (ODC Space) K.R. Gehringer (JPL) W.L. Taber (JPL) F.S. Turner (JPL) VersionSPICELIB 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