KPG1_GTGRP

Obtains a group of strings from the environment

Description:

This routine obtains group of strings using the specified parameter, and returns them in a GRP group (see SUN/150).

The user specifies the strings by supplying a GRP group expression for the parameter value. If the final character in the supplied string is the group " flag character" (a minus sign by default), then the user is re-prompted for another group expression, and the strings specified by the second group expression are appended to the returned group. This continues until a group expression is supplied which does not end with the continuation character, or a null value is supplied (which is annulled).

Normally, the " current value" for the parameter on exit would be the final group expression. If more than one group expression was supplied, then this will not represent the entire group. For this reason, this routine concatenates all the group expressions supplied, and stores the total group expression as the parameter value before exiting. Since a new value is stored for the parameter, the parameter should ne be given an access mode of READ in the interface file.

If a null value is supplied the first time the parameter value is obtained, then the PAR__NULL status is returned, and SIZE is returned as zero (a valid GRP identifier is still returned however). If a null value is supplied on a subsequent access to the parameter, then the PAR__NULL status is annulled, and the group is returned containing any values obtained earlier.

Invocation

CALL KPG1_GTGRP( PARAM, IGRP, SIZE, STATUS )

Arguments

PARAM = CHARACTER ( ) (Given)
The name of the parameter to use.
IGRP = INTEGER (Given and Returned)
The group to use. If this is GRP__NOID then a new group is created with default control characters and its identifier is returned. If the group already exists, its contents are discarded before adding new strings.
SIZE = INTEGER (Returned)
The total size of the returned group. Returned equal to zero if an error occurs.
STATUS = INTEGER (Given and Returned)
The global status.