FIND_DB2_SYSTEMS function for RRSAF

The RRSAF FIND_DB2_SYSTEMS function identifies all active Db2 subsystems on a z/OS® LPAR.

The following diagram shows the syntax of the FIND_DB2_SYSTEMS function.

DSNRLI FIND_DB2_SYSTEMS function

Read syntax diagramSkip visual syntax diagramCALL DSNRLI(function,ssnma,activea,arraysz,,retcode,reascode)
Parameters point to the following areas:
function
An 18-byte area that contains FIND_DB2_SYSTEMS followed by two blanks.
ssnma
A storage area for an array of 4-byte character strings into which RRSAF places the names of all the Db2 subsystems (SSIDs) that are defined for the current LPAR. You must provide the storage area. If the array is larger than the number of Db2 subsystems, RRSAF returns the value ' ' (four blanks) in all unused array members.
activea
A storage area for an array of 4-byte values into which RRSAF returns an indication of whether a defined subsystem is active. Each value is represented as a fixed 31-bit integer. The value 1 means that the subsystem is active. The value 0 means that the subsystem is not active. The size of this array must be the same as the size of the ssnma array. If the array is larger than the number of Db2 subsystems, RRSAF returns the value -1 in all unused array members.

The information in the activea array is the information that is available at the point in time that you requested it and might change at any time.

arraysz
A 4-byte area, represented as a fixed 31-bit integer, that specifies the number of entries for the ssnma and activea arrays. If the number of array entries is insufficient to contain all of the subsystems defined on the current LPAR, RRSAF uses all available entries and returns return code 4.
retcode
A 4-byte area in which RRSAF is to place the return code for this call to the FIND_DB2_SYSTEMS function.

This parameter is optional. If you do not retcode, RRSAF places the return code in register 15 and the reason code in register 0.

reascode
A 4-byte area in which RRSAF is to place the reason code for this call to the FIND_DB2_SYSTEMS function.

This parameter is optional. If you do not specify reascode, RRSAF places the reason code in register 0.

Example values that the FIND_DB2_SYSTEMS function returns

Assume that two subsystems are defined on the current LPAR. Subsystem DB2A is active, and subsystem DB2B is stopped. Suppose that you invoke RRSAF with the function FIND_DB2_SYSTEMS and a value of 3 for arraysz. The ssnma array and activea array are set to the following values:
Table 1. Example values returned in the ssnma and activeaarrays
Array element number Values in ssnma array Values in activea array
1 DB2A 1
2 DB2B 0
3 (four blanks) -1