Groups of Sector NumbersΒΆ

We already have seen how, with the add and do commands, it is useful to be able to specify a group of integers as arguments. In the lint, index, and ctrl commands which we are about to explain, this concept of a group of integers is carried further. For use in these commands, the group is specified first and then used in the commands. G7 has a dynamic group that can be specified and respecified over and over as necessary. It also can use the static groups as are defined in the Fixer program.

The dynamic group is defined by the command:

group <group definition>

Define the content of the dynamic group. The sector numbers are specified as in the add command.

Example:

group 19-25 (20 22)

The name of this dynamic group is ‘:’. The names and content of the static groups defined in Fixer are preceded by a ‘:’ in the following commands.

Named groups also can be introduced with the group command. The format is:

group <group name>
<group definition>
This version of the group command adds a named group to the GROUPS.BIN file. This group then can be used in other commands requiring group expressions by prefixing the group name with a colon ‘:’. The group definition include a sequence of integers, a range of integers, a set of letters to specify spreadsheet columns, and other named groups. To exclude a set of values from the group definition, simply include the set to be excluded in parentheses.

For example:

group Manufacturing   # All manufacturing sectors
1-58
f empmfg = @csum(emp, :Manufacturing)
group NonchemicalMfg  # All manufacturing sectors except chemicals
:Manufacturing (20-27)
listgroups
List the names of all of the groups currently in the GROUPS.BIN file.
glist <name>

List the sectors in a group. The <name> specifies the group name.

After the above group command, the command

glist :

would give the answer

19 21 23 24 25

If the listgroups command gives the answer

Ag Min Mfg Trans Trade Util Serv

Then

glist Ag

might, for example, give an answer like

1  2  3  4

Previous topic

Matrix Calculations in VAM files

Next topic

The Resector Command

This Page