GRP_COPY

Copy a section of an existing group to a new group

Description:

A new group is created by copying a section of an existing group specified by the range of indices supplied in INDXLO and INDXHI. The whole group is used if INDXLO and INDXHI are both zero. The output group can be formed in one of two ways:

1) All names from the input group are copied to the output group except for those with indices in the given range.

2) Only those names from the input group which have indices within the given range are copied to the output group.

The method used is determined by the argument REJECT. Note, a name with a given index in the input group will have a different index in the output group if INDXLO is not 1 (or zero). The new group inherits the type, control characters and case sensitivity flag of the old group, but does not inherit any owner/slave relationships (see routine GRP_SOWN). If the input group is no longer required, it should be deleted using GRP_DELET.

Invocation

CALL GRP_COPY( IGRP, INDXLO, INDXHI, REJECT, IGRP2, STATUS )

Arguments

IGRP1 = INTEGER (Given)
A GRP identifier for the input group.
INDXLO = INTEGER (Given)
The lowest index to reject or to copy.
INDXHI = INTEGER (Given)
The highest index to reject or to copy.
REJECT = LOGICAL ( Given)
If reject is .TRUE., then names in the given range are rejected. Otherwise, names in the given range are copied.
IGRP2 = INTEGER (Returned)
A GRP identifier for the created group. Returned equal to GRP__NOID if an error occurs.
STATUS = INTEGER (Given and Returned)
The global status.