dastb |
Table of contents
ProcedureDASTB ( DAS, convert transfer file to binary file ) SUBROUTINE DASTB ( XFRLUN, BINFIL ) AbstractConvert the contents of a DAS transfer file into an equivalent binary DAS file. Required_ReadingDAS KeywordsCONVERSION FILES DeclarationsIMPLICIT NONE INTEGER XFRLUN CHARACTER*(*) BINFIL Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- XFRLUN I Logical unit of an open DAS transfer file. BINFIL I Name of the binary DAS file to be created. Detailed_InputXFRLUN is the Fortran logical unit number of a previously opened DAS transfer file. The file pointer should be positioned ready to read the DAS file ID word. BINFIL is the name of the binary DAS file to be created. Detailed_OutputNone. ParametersNone. Exceptions1) If the DAS transfer file cannot be read, the error SPICE(FILEREADFAILED) is signaled. 2) If the specified file is not a DAS file, as indicated by the file's ID word, the error SPICE(NOTADASFILE) is signaled. 3) If an error occurs while attempting to decode data in the DAS transfer file, the error SPICE(BADDASTRANSFERFILE) is signaled. 4) If the DAS file cannot be written, an error is signaled by a routine in the call tree of this routine. 5) The binary DAS file opened by this routine, BINFIL, is only GUARANTEED to be closed upon successful completion of the text to binary conversion process. In the event of an error, the caller of this routine is required to close the binary DAS file BINFIL. FilesSee arguments XFRLUN, BINFIL. ParticularsAny binary DAS file may be transferred between heterogeneous Fortran environments by converting it to an equivalent file containing only ASCII characters called a DAS transfer file. Such a file can be transferred almost universally using any number of established protocols. Once transferred, the DAS transfer file can be converted to a binary file using the representations native to the new host environment. This routine provides a mechanism for converting a DAS transfer file created by DASBT, or an equivalent procedure, into an equivalent binary DAS file which may be used with the SPICE system. It is one of a pair of routines for performing conversions between the binary format of a DAS file and the DAS transfer file. The inverse of this routine is the routine DASTB. Upon successful completion, the binary DAS file specified by BINFIL will have been created. The binary DAS file that was created will be closed when this routine exits. The DAS transfer file will remain open, as it was on entry, and it will be positioned to read the first line after the encoded DAS file data. ExamplesLet XFRLUN be the Fortran logical unit attached to a DAS transfer file which is to be converted into its binary DAS equivalent. BINFIL be the name of the binary DAS file which will be created. Then, the following subroutine call would read the DAS transfer file attached to the Fortran logical unit XFRLUN, convert its data into binary format, and write that data to the binary DAS file which is being created: CALL DASTB( XFRLUN, BINFIL ) Restrictions1) This routine assumes that it is positioned ready to read the DAS file ID word from the encoded text DAS file. Literature_ReferencesNone. Author_and_InstitutionN.J. Bachman (JPL) J. Diaz del Rio (ODC Space) K.R. Gehringer (JPL) VersionSPICELIB Version 3.3.0, 02-JUN-2021 (JDR) Added IMPLICIT NONE statement. Edited the header to comply with NAIF standard. SPICELIB Version 3.2.0, 05-FEB-2015 (NJB) Updated to support integration with the handle manager subsystem. Corrected typo in a long error message and several typos in comments. Re-ordered header sections. SPICELIB Version 3.1.0, 06-DEC-1995 (KRG) Updated the call to DASONW; a new argument was added to the call for reserving comment records. SPICELIB Version 3.0.0, 13-AUG-1994 (KRG) Updated the header and in line comments to reflect the change from calling files text files to calling them transfer files. Changed the variable name XFRLUN to XFRLUN to make it compatible with the change in terminology. Changed the short error message "BADDASTEXTFILE" to the message "BADDASTRANSFERFILE". SPICELIB Version 2.0.0, 27-OCT-1993 (KRG) Updated the routine to use the new format ID words which contain type as well as architecture information. Fixed a typo in the description of the DAS encoded text file: ncomc appeared where nresvc should have been. SPICELIB Version 1.0.0, 02-NOV-1992 (KRG) |
Fri Dec 31 18:36:11 2021