One of the most important properties of HDS is that its data files are self describing. This means that each object carries with it information describing all its attributes (not just its value), and these attributes can be obtained by means of enquiry routines. An example will illustrate:

        PARAMETER ( MAXCMP = 10 )
  *  Enquire the names and types of up to MAXCMP components...
  *  First store the total number of components.
  *  Now index through the structure’s components, obtaining locators and the
  *  required information.
        DO 1 I = 1, MIN( NCOMP, MAXCMP )
  *  Get a locator to the I’th component.
  * Obtain its name and type.
           CALL DAT_NAME( LOC, NAME( I ), STATUS )
           CALL DAT_TYPE( LOC, TYPE( I ), STATUS )
  * Is it primitive?
           CALL DAT_PRIM( LOC, PRIM( I ), STATUS )
   1    CONTINUE

Here DAT_INDEX is used to get locators to objects about which (in principle) we know nothing. This is just like listing the files in a directory, except that the order in which the components are stored in an HDS structure is arbitrary so they won’t necessarily be accessed in alphabetical order.