ARRAY CONNECT


This command establishes a logical connection between one or more EXECs and an array.

Command

Parameters

ARRAY|ARY CONNECT

name

[UPDATE|READ]

[TOKEN()]

The following table describes the parameters.

Parameter

Function

Notes

name

name of the array as established during array creation

1-31 characters alphanumeric

This parameter is required.

UPDATE|READ

array access definition

UPDATE is the default value.

Multiple read accesses by separate threads to an array are possible. However, UPDATE requires exclusive access.

TOKEN

array token returned by DISC KEEP

When not specified, the array is retrieved from DASD. When specified, only disconnected arrays are eligible.

When retrieving an array from disc, the current position is at the very beginning of the array. Neither a View nor a Sort specification will exist. When reconnecting to a kept array position, Sort and View criteria will be exactly as left off.

Condition codes are listed in the following table.

Value

Description

0

Command was executed successfully.

8

Array was not found or error reading from disc / cannot create temp copy.

16

Syntax error occurred.

Example

The EXEC attempts to establish a connection to the array named DASDSTATS that it assumes has been disconnected. If this attempt fails, a disc copy is loaded.

REXX EXEC example:

'IMFEXEC ARRAY CONNECT DASDSTATS TOKEN('arytoken')'
if imfcc <> 0 then 'IMFEXEC ARRAY CONNECT DASDSTATS READ'

CLIST example:

IMFEXEC ARRAY CONNECT DASDSTATS TOKEN(&ARYTOKEN)
IF &IMFCC NE 0 THEN IMFEXEC ARRAY CONNECT DASDSTATS READ

 

Note

After invoking the ARRAY CONNECT command, you can call the debugging EXEC, DUMPARY, that was first described in the section entitled When-are-arrays-useful.

By adding one of the following statements following the ARRAY CONNECT command

IMFEXEC SELECT EXEC(DUMPARY ARRAY(array) ROWS(n) COLS(n) CON(N)) WAIT(YES)

or

CALL DUMPARY 'ARRAY(array) ROWS(n) COLS(n) CON(N)'

where array is the name of the array returned by ARRAY CONNECT to your EXEC, you can write the contents of the array to the BBI journal.

Note that if you do not specify a value for ROWS() or COLS(), the entire array will be written to the journal.

 

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