Previous Topic: PUTP CommandNext Topic: SET Command


SELECT Command

The SELECT command can either specify a variable group for a single GLV command or specify a default variable group for subsequent GLV commands to act upon.

This command has the following format:

ADDRESS GLV 'SELECT vargroup [glvcommand]'
vargroup

Specifies the name of a variable group that you want to either select as the default group for subsequent GLV commands (if glvcommand is not specified) or use as an override for the specified GLV command.

Default: UNNAMED

glvcommand

(Optional) One of the following GLV commands:

GET

PUTP

SETL

LIST

PURGE

SETLP

PUT

SET

SETP

Note: If you specify SELECT as an operand in one of the GLV commands listed here, the selected variable group applies to that command only and does not change the default variable group.

Usage Notes:

Example:

In the following REXX code, assume that the default variable group is 'UNNAMED' because you have not issued a SELECT command to select another default variable group.

The first LIST command requests the value of the GLV variable LAST_USER that was previously set in the ‘UNNAMED’ variable group. The second LIST command requests the value of the GLV variable NEW_USER that was previously set in the ‘TESTER’ variable group. The third LIST command requests the value of the GLV variable CURRENT_USER that was previously set in the ‘OPERATOR’ variable group. The fourth LIST command requests the value of the GLV variable OLD_USER that was previously set in the ‘TESTER’ variable group.

ADDRESS GLV 'LIST LAST_USER'
PULL LAST_USER.UNNAMED
ADDRESS GLV 'SELECT TESTER'
ADDRESS GLV 'LIST NEW_USER'
PULL NEW_USER.TESTER
ADDRESS GLV 'SELECT OPERATOR LIST CURRENT_USER'
PULL CURRENT_USER.OPERATOR
ADDRESS GLV 'LIST OLD_USER'
PULL OLD_USER.TESTER