| dafopn |
|
Table of contents
Procedure
DAFOPN ( DAF, open new )
ENTRY DAFOPN ( FNAME, ND, NI, IFNAME, RESV, HANDLE )
Abstract
Deprecated: This routine has been superseded by the SPICELIB
routine DAFONW. NAIF supports this routine only to provide
backward compatibility.
Open a new DAF for subsequent write requests.
Required_Reading
DAF
Keywords
DAF
FILES
Declarations
CHARACTER*(*) FNAME
INTEGER ND
INTEGER NI
CHARACTER*(*) IFNAME
INTEGER RESV
INTEGER HANDLE
Brief_I/O
VARIABLE I/O DESCRIPTION
-------- --- --------------------------------------------------
FNAME I Name of DAF to be opened.
ND I Number of double precision components in summaries.
NI I Number of integer components in summaries.
IFNAME I Internal file name.
RESV I Number of records to reserve.
HANDLE O Handle assigned to DAF.
Detailed_Input
FNAME is the name of a new DAF to be created (and
consequently open for write access).
ND is the number of double precision components
in each array summary of the new file.
NI is the number of integer components in each
array summary in the new file.
IFNAME is the internal file name (containing as many as 60
characters) for the new file. This should uniquely
identify the file.
RESV is the number of records in the new file to be
reserved for non-DAF use. The user may reserve
records 2 through (2 + RESV - 1) in the file.
These records are not used to store DAF data,
and are in fact invisible to all DAF routines.
Detailed_Output
HANDLE is the file handle associated with the file. This
handle is used to identify the file in subsequent
calls to other DAF routines.
Parameters
None.
Exceptions
1) If the specified file cannot be opened without exceeding
the maximum number of files, the error SPICE(DAFFTFULL)
is signaled.
2) If the input argument ND is out of the range [0, 124]
or if NI is out of the range [2, 250], the error
SPICE(DAFINVALIDPARAMS) is signaled.
3) If
ND + ( NI + 1 ) / 2 > 125
the error SPICE(DAFINVALIDPARAMS) is signaled.
4) If the number of records to be reserved is not zero or
positive, the error SPICE(DAFNORESV) is signaled.
5) If an I/O error occurs in the process of opening the file,
the error is signaled by a routine in the call tree of this
routine.
6) If (for some reason) the initial records in the file cannot
be written, the error SPICE(DAFWRITEFAIL) is signaled.
7) If no logical units are available, an error is
signaled by a routine in the call tree of this routine.
8) If the file name is blank or otherwise inappropriate,
an error is signaled by a routine in the call tree of this
routine.
Files
See argument FNAME.
Particulars
The DAFs created by DAFOPN have initialized file records but
do not yet contain any arrays. See the DAF Required Reading
for a discussion of file records.
This entry point has been made obsolete by the entry point DAFONW.
It is supported for reasons of backward compatibility only. New
software development should use the entry point DAFONW.
Examples
In the following code fragment, DAFOPN is used to open a file,
to which a new array is then added.
CALL DAFOPN ( FNAME, ND, NI, IFNAME, 0, HANDLE )
CALL DAFBNA ( HANDLE, SUM, NAME )
CALL GET_DATA ( DATA, N, FOUND )
DO WHILE ( FOUND )
CALL DAFADA ( DATA, N )
CALL GET_DATA ( DATA, N, FOUND )
END DO
CALL DAFENA
Restrictions
1) Files opened using this routine must be closed with DAFCLS.
Literature_References
None.
Author_and_Institution
N.J. Bachman (JPL)
J. Diaz del Rio (ODC Space)
K.R. Gehringer (JPL)
J.M. Lynch (JPL)
H.A. Neilan (JPL)
W.L. Taber (JPL)
F.S. Turner (JPL)
I.M. Underwood (JPL)
E.D. Wright (JPL)
Version
SPICELIB Version 8.1.2, 25-NOV-2021 (JDR)
Edited the header to comply with NAIF standard.
SPICELIB Version 8.1.1, 10-OCT-2012 (EDW)
Edited $Abstract section to use "Deprecated" keyword
and state replacement routine.
Corrected ordering of header section.
Removed the obsolete Reference citation to "NAIF
Document 167.0."
SPICELIB Version 8.1.0, 02-APR-2002 (FST)
This routine was updated to accommodate changes to the
handle manager interface. See DAFAH's Revision section
for details.
SPICELIB Version 8.0.0, 13-NOV-2001 (FST)
This routine was updated to utilize the new handle manager
software to manage binary file formats and consolidated
I/O code.
SPICELIB Version 7.0.4, 08-OCT-1999 (WLT)
The environment lines were expanded so that the supported
environments are now explicitly given. New
environments are WIN-NT
SPICELIB Version 7.0.3, 16-SEP-1999 (NJB)
CSPICE environments were added. Some typos were corrected.
SPICELIB Version 7.0.2, 28-JUL-1999 (WLT)
The environment lines were expanded so that the supported
environments are now explicitly given. New
environments are PC-DIGITAL, SGI-O32 and SGI-N32.
SPICELIB Version 7.0.1, 17-MAR-1999 (WLT)
The environment lines were expanded so that the supported
environments are now explicitly given. Previously,
environments such as SUN-SUNOS and SUN-SOLARIS were implied
by the environment label SUN.
SPICELIB Version 4.0.0, 03-MAR-1999 (FST)
The entry point was modified to insert the FTP validation
string, as well as the binary file format into the file record.
SPICELIB Version 3.1.0, 08-MAR-1996 (KRG)
The modifications support the notion of a DAF comment area,
and involve writing NULL filled reserved records when the
number of reserved records is greater than zero (0).
Some nested IF...THEN...ELSE IF...THEN...END IF constructs
were expanded to be independent IF...THEN...END IF tests.
The tests were for IOSTAT errors on cascading write statements
nested in the IF...ELSE IF... statements, and this was
confusing. These tests were restructured so that IOSTAT is
tested after each write statement which is equivalent to the
original intent and easier to read.
SPICELIB Version 3.0.0, 29-SEP-1993 (KRG)
Modified the logical structure of some
IF ... THEN ... ELSE IF... END IF
statements which were testing different items in each ELSE IF
clause for failure into separate IF ... END IF statements. This
improved the readability and supportability of the code.
SPICELIB Version 2.1.0, 25-FEB-1993 (JML)
A new variable LUN is used for the logical unit number
returned by GETLUN.
The file name is checked to see if it is blank.
The file name string that is passed to the FORTRAN OPEN and
INQUIRE statements has been chopped at the last non-blank
character.
SPICELIB Version 2.0.1, 10-MAR-1992 (WLT)
Comment section for permuted index source lines was added
following the header.
SPICELIB Version 2.0.0, 03-SEP-1991 (NJB) (HAN) (WLT)
Updated to allow multiple DAFs to be open for write
access simultaneously. An error in a calling sequence
shown in the $Examples section was corrected.
This routine was updated so that it now keeps current the set
of DAF handles returned by DAFHOF.
SPICELIB Version 1.0.1, 22-MAR-1990 (HAN)
Literature references added to the header.
SPICELIB Version 1.0.0, 31-JAN-1990 (IMU)
|
Fri Dec 31 18:36:08 2021