next up previous
Next: DAT_PREC - Enquire storage precision
Up: ROUTINE DESCRIPTIONS
Previous: DAT_NEWC - Create string component

DAT_PAREN - Locate parent structure   

Description:
The routine returns a locator for the parent structure of an HDS object; i.e. the structure which contains the object.

Invocation:
CALL DAT_PAREN( LOC1, LOC2, STATUS )

Arguments:
LOC1 = CHARACTER * ( DAT__SZLOC ) (Given)
Object locator.
LOC2 = CHARACTER * ( DAT__SZLOC ) (Returned)
Parent structure locator.
STATUS = INTEGER (Given and Returned)
The global status.

Notes:
  • On successful exit, the parent structure locator will identify a scalar structure (number of dimensions zero). If appropriate, this may be a cell of a structure array.
  • An error will result, and the STATUS value DAT__OBJIN will be returned if the object supplied does not have a parent; i.e. if it is the top-level object in a container file. The DAT__OBJIN error code is defined in the include file DAT_ERR.
  • If this routine is called with STATUS set, then a value of DAT__NOLOC will be returned for the LOC2 argument, although no further processing will occur. The same value will also be returned if the routine should fail for any reason. The DAT__NOLOC constant is defined in the include file DAT_PAR.

Example
The parent of the object A.B.C.D is A.B.C, the parent of X.DATA.ARRAY(1:256) is X.DATA, and the parent of Z.STRUC(17).FLAG is Z.STRUC(17).



next up previous
Next: DAT_PREC - Enquire storage precision
Up: ROUTINE DESCRIPTIONS
Previous: DAT_NEWC - Create string component

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