See the documentation on the RMF
A link can be destroyed using the
FRI_PUTI
routine which takes the ADI identifier of the object to be linked. The
former routine is less robust as it is quite possible to write references
to non-existent files.FRI_GET
.
Secondly, the associated file can be opened directly using ADI_FOPEN
,
except that the file name is extracted from the named link rather being
supplied directly.Representation of file links in HDS
File links are stored in HDS in one of two ways. If the supplied object
to be linked is itself an HDS file then the Starlink REF facility is
used to write the reference to a structure called
linknameREF
in the structure
MORE.ASTERIX
. If the supplied object is not an HDS file, or
if the user supplied the text name of the linked file then FRI writes a
component of the same name which is simply a character string.Representation of file links in FITS
File links are represented using FITS keywords whose name is generally the
logical name of the link with FILE
appended. The exception is
the PRIMARY link whose name is dependent on the exact format being
written. For OGIP spectra the keyword name is PHAFILE
.Examples
Creating a file link
program crelink
character*132 ifile
character*5 ltype
character*80 link
integer id
integer status
call getarg(1,ifile)
call getarg(2,ltype)
call getarg(3,link)
status = 0
call adi_fopen( ifile, 'update', '*', id, status )
call fri_putc( id, ltype, link, status )
call adi_fclose( id, status )
end
Further Reading
David J. Allan (dja@star.sr.bham.ac.uk)