next up previous
Next: SUBSETS OF OBJECTS
Up: HDS Hierarchical Data System
Previous: MAPPING CHARACTER DATA

COPYING AND DELETING OBJECTS   

HDS objects may be individually copied and deleted. The routines DAT_COPY and DAT_ERASE will recursively copy and erase all levels of the hierarchy below that specified in the subroutine call:

      ...
      CHARACTER * ( DAT__SZLOC ) OLOC

*  Copy the AXIS structure to component AXISCOPY of the structure located
*  by OLOC (which must have been previously defined).
      CALL DAT_FIND( NLOC, 'AXIS', ALOC, STATUS )
      CALL DAT_COPY( ALOC, OLOC, 'AXISCOPY', STATUS )
      CALL DAT_ANNUL( ALOC, STATUS )

* Erase the original AXIS structure.
      CALL DAT_ERASE( NLOC, 'AXIS', STATUS )

Note that we annulled the locator to the AXIS object before attempting to delete it. This whole operation can also be done using DAT_MOVE:

      CALL DAT_MOVE( ALOC, OLOC, 'AXISCOPY', STATUS )



next up previous
Next: SUBSETS OF OBJECTS
Up: HDS Hierarchical Data System
Previous: MAPPING CHARACTER DATA

HDS Hierarchical Data System
Starlink User Note 92
R.F. Warren-Smith & M.D. Lawden
23rd February 1999
E-mail:rfws@star.rl.ac.uk

Copyright (C) 1999 Central Laboratory of the Research Councils