Fame Glow Feed

Premium fame highlights with sleek curation.

general

ARRAY SET - Documentation for BMC AMI Ops Automation 8.3

Writer James Rogers

This command transfers the entire contents of an array into REXX variables.

Command

Parameters

ARRAY | ARY SET

Name

[TRIM | NOTRIM]

The following table describes the parameters.

Parameter

Function

Notes

Name

Name of the array as established during array creation

Enter a 1- to 31-characters alphanumeric name.

TRIM

Defines whether leading and trailing blanks are removed (trimmed)

The default is NOTRIM.

This command takes all rows and columns and creates REXX variables from them. Each variable name is identical to the column that it was derived from. A period ‘.’ is then appended (effectively turning it into a stem variable) and then a counter is added for the row that it was copied from.

For example, for a column of UNIT, TSO/E variables are created with names UNIT.1 to UNIT. xx.

This command functions properly only on column names that do not exceed 26 characters in length (since it appends .(_) xxxxx to the variable name). If column names exceeding 26 characters in length are found, a return code of 8 is returned.

Condition codes are listed in the following table.

Value

Description

0

Command was successfully executed.

4

Array is empty.

8

Array was not found or column name wider than 26 characters was found.

16

Syntax error occurred.

Example

This EXEC connects to the array DASDSTAT and sets all columns and rows to their respective REXX variables. It then writes a message to the log designating the contents of the unit column of the first row.

REXX EXEC example:

"IMFEXEC ARRAY CONNECT DASDSTAT"
"IMFEXEC ARRAY SET DASDSTAT"
"IMFEXEC ARRAY DISC DASDSTAT NOSAVE"
"IMFEXEC MSG 'unit.1

CLIST example:

IMFEXEC ARRAY CONNECT DASDSTAT
IMFEXEC ARRAY SETVIEW DASDSTAT CRITERIA('STAT,,,=,''ACTIVE'',OR,STAT,,,=,''ACTIVE''')
IMFEXEC ARRAY SORT DASDSTAT CRITERIA('VOL,,,A')
SET I=1
IMFEXEC ARRAY INFO DASDSTAT
IMFEXEC MSG The following volumes are active:
DO WHILE &I LE &ARYLROWS IMFEXEC ARRAY GET DASDSTAT SKIP IMFEXEC MSG &VOL SET I=&I+1
END