ARRAY INSERT


This command allows you to insert a row into the specified array.

Command

Parameters

ARRAY|ARY INSERT

name[HERE|FIRST|LAST]

The following table describes the parameters.

Parameter

Function

Notes

name

name of the array as established during array creation

1- to 31-characters alphanumeric

position in the array where row will be inserted

Could be one of the following values:

HERE: at the current position

FIRST: at the top of the array (element 1)

LAST: as the last element of the element

If the array is ordered, the current position will always be determined by the sort criteria and field contents and this specification will be ignored.

Condition codes are listed in the following table.

Value

Description

0

Command was successfully executed.

8

Array was not found.

12

Array was not in UPDATE access.

16

Syntax error occurred.

20

Array cannot be expanded further.

Example

This EXEC inserts a new row into the array referenced by the token contained in the variable DASDSTATS. It then sets the value of this row and checkpoints the contents of the array to permanent storage.

REXX EXEC example:

unit=3E0
vol=BAB301
stat=ACTIVE
'IMFEXEC ARRAY INSERT DASDSTATS'
'IMFEXEC ARRAY SAVE DASDSTATS'

CLIST example:

SET UNIT=3E0
SET VOL=BAB301
SET STAT=ACTIVE
IMFEXEC ARRAY INSERT DASDSTATS
IMFEXEC ARRAY SAVE DASDSTATS

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*