| dasbt |
|
Table of contents
Procedure
DASBT ( DAS, convert binary file to transfer file )
SUBROUTINE DASBT ( BINFIL, XFRLUN )
Abstract
Convert the contents of a binary DAS file to an equivalent DAS
transfer file.
Required_Reading
DAS
Keywords
CONVERSION
FILES
Declarations
IMPLICIT NONE
CHARACTER*(*) BINFIL
INTEGER XFRLUN
Brief_I/O
VARIABLE I/O DESCRIPTION
-------- --- --------------------------------------------------
BINFIL I Name of the binary DAS file to be converted.
XFRLUN I Logical unit of a previously opened file.
Detailed_Input
BINFIL is the name of a binary DAS file which is to be converted
to an equivalent DAS transfer file.
XFRLUN is the Fortran logical unit number of a previously opened
file. The DAS transfer file will be written to the
file attached to this logical unit beginning at the
current position in the file.
Detailed_Output
None.
Parameters
None.
Exceptions
1) If the binary DAS file specified by the filename BINFIL cannot
be opened for read access, an error is signaled by a routine
in the call tree of this routine.
2) If for some reason the DAS transfer file cannot be written
to, the error SPICE(FILEWRITEFAILED) is signaled.
3) If, for any reason, the DAS file cannot be read, an error is
signaled by a routine in the call tree of this routine.
4) The binary DAS file opened by this routine, BINFIL, is only
GUARANTEED to be closed upon successful completion of the
binary to transfer conversion process. In the event of an
error, the caller of this routine is required to close the
binary DAS file BINFIL.
5) If the values for the number of reserved records or the
number of reserved characters in a DAS file is nonzero,
the error SPICE(BADDASFILE) is signaled. THIS ERROR
IS SIGNALED ONLY BECAUSE THE RESERVED RECORD AREA HAS
NOT YET BEEN IMPLEMENTED.
Files
See arguments BINFIL, XFRLUN.
Particulars
Any 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 binary DAS
file into an equivalent DAS transfer file. 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 DAS transfer file attached to
Fortran logical unit XFRLUN will contain the same data as the
binary DAS file BINFIL in an encoded ASCII format. The binary DAS
file BINFIL will be closed when this routine exits successfully.
The DAS transfer file will remain open, as it was on entry, and it
will be positioned to write on the first line following the
encoded data from the binary DAS file.
Examples
Let
BINFIL be the name of a binary DAS file which is to be
converted to an equivalent DAS transfer file. This
could be for purposes of porting the data to a
different computer platform, or possibly for
archival storage of the data.
XFRLUN be the Fortran logical unit to which the DAS transfer
file is to be written.
Then, the following subroutine call would read the binary DAS
file BINFIL, convert its contents into an encoded format, and
then write that data to the DAS transfer file attached to XFRLUN,
beginning at the current position in that file.
CALL DASBT ( BINFIL, XFRLUN )
Restrictions
None.
Literature_References
None.
Author_and_Institution
N.J. Bachman (JPL)
J. Diaz del Rio (ODC Space)
K.R. Gehringer (JPL)
Version
SPICELIB Version 3.2.0, 02-JUN-2021 (JDR)
Added IMPLICIT NONE standard.
Edited the header to comply with NAIF standard. Removed
unnecessary $Revisions section.
SPICELIB Version 3.1.0, 05-FEB-1995 (NJB)
Updated to support integration with the handle manager
subsystem.
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 TXTLUN to XFRLUN to make it
compatible with the change in terminology.
SPICELIB Version 2.0.0, 13-AUG-1994 (KRG)
A potential problem with list directed writes was fixed. Some
compilers have list directed writes that write multiple comma
separated items to one line and other compilers write these to
multiple lines even when all of the output will fit on a single
line. This was fixed by replacing all of the affected list
directed write statements with code to put the desired data
into a character string and then write the character string.
SPICELIB Version 1.0.0, 29-OCT-1992 (KRG)
|
Fri Dec 31 18:36:10 2021