Safeguard Management Programming Manual (G06.29+, H06.08+, J06.03+)

Common Definitions
Safeguard Management Programming Manual—422086-028
6-7
SAFECOM WHERE GROUP selection options
comparisons logically using the AND and OR logical operators specified in the
expression.
SAFECOM WHERE GROUP selection options
For SPI programming, the SAFECOM WHERE GROUP and WHERE PRIMARY-
GROUP selection options are implemented as follows:
You can use these tokens in the command buffer of any USER or ALIAS command
(except ADD) to select users or aliases based on group or primary group membership.
Examples of using the selection expressions appear at the end of this section.
The general procedure for using these tokens is to specify ZSPI-TKN-SEL-OPERAND
tokens to build an array of operands. Each operand contains one value. This value can
be one of the following tokens: ZSFG-TKN-GROUPID, ZSFG-TKN-PRIMARY-
GROUPID, or ZSPI-TKN-SEL-CONSTANT.
Typically, the operand array used in a WHERE GROUP expression contains one group
ID token and several constants that represent group numbers. Such an array allows
you to specify that a user must belong to one or a combination of the groups whose
group numbers are specified by the constants in the array. A minimum of two operands
is required to perform a simple comparison. For example, a simple comparison that
selects all users who belong to group number 244 has two operands—one that
specifies ZSFG-TKN-GROUPID and one that specifies ZSPI-TKN-SEL-CONSTANT.
The constant contains the number 244.
When the operand array is defined, the token ZSPI-TKN-SEL-EXPRESSION allows
you to specify the comparison of operands selected from the array. For example, the
expression could specify that operand 2 must equal operand 4. In addition, you can
combine the results of the comparisons logically with AND and OR logical operators
specified in the expression. For example, operand 2 must equal operand 4 OR
operand 2 must equal operand 6.
Specifying Operands
The ZSPI-TKN-SEL-OPERAND token is used to specify a single operand to be used in
a comparison.
Multiple occurrences of this token are allowed. In fact, a comparison is not possible
unless you define at least two operands. The operand array is built from ZSPI-TKN-
SEL-OPERAND tokens, with array elements matching the order in which the
ZSPI-TKN-SEL-OPERAND tokens are listed. That is, the first such token is element 1
in the operand array, the second token is element 2 in the array, and so on. This
exactly corresponds to the token index as defined for the SSGET procedure. (See the
SPI Programming Manual.)
ZSPI-TKN-SEL-OPERAND has the following format:
ZSPI-TKN-SEL-OPERAND token-type ZSPI-DDL-SEL-OPERAND
def ZSPI-DDL-SEL-OPERAND
02 ZVALUE-TYPE type ZSPI-TYP-ENUM