next up previous 204
Next: Deleting Names
Up: Using GRP Routines
Previous: Retreiving Names from a Group

Retrieving Attributes of Names

Each name has associated with it various attributes, which can be retrieved using GRP_INFOC (for attributes which take character values) and GRP_INFOI (for attributes which take integer values). In both cases, the particular attribute required is specified by the argument ITEM. Attributes of a name are carried round with the name if it is copied using GRP_COPY, GRP_REMOV or GRP_PURGE. The following attributes are currently used:

MODGRP
- An integer which has the value GRP__NOID unless the name was specified using a modification element. Otherwise, it is the identifier for the group which was used as the basis for the modification element (see section [*]).

MODIND
- An integer value which is zero unless the name was specified using a modification element. Otherwise, it is the index of the name within the basis group (i.e. the group identified by the MODGRP attribute) which was modified in order to generate the specified name.

DEPTH
- An integer value which is zero unless the name was specified using an indirection element. Otherwise, it is the number of levels of indirection at which the literal name was specified. For instance, consider the case where a prompt issued by GRP_GROUP is responded to with the group expression

      ^FILE1.DAT

and the file FILE1.DAT contains the single record ``NAME1,^FILE2.DAT'', and the file FILE2.DAT contained the single record ``NAME2''. The DEPTH attribute would have a value of 1 for name NAME1 indicating that the name was given within a file specified directly within the group expression, and a value of 2 for name NAME2 indicating that the name was given within a file which was itself given within another file.

FILE
- A character value which is returned blank unless the name was specified using an indirection element. Otherwise, it is the name of the file in which the name was literally stored. Thus, in the above example it would be FILE1.DAT for name NAME1 and FILE2.DAT for NAME2.

NAME
- A character value equal to the name itself.



next up previous 204
Next: Deleting Names
Up: Using GRP Routines
Previous: Retreiving Names from a Group

GRP Routines for Managing Groups of Objects
Starlink User Note 150
D.S. Berry
21st October 2009
E-mail:ussc@star.rl.ac.uk

Copyright © 2009 Science and Technology Facilities Council