Show current connection to memory pools
| Component: | BS2000 | 
| Functional area: | System control and optimization | 
| Domain: | PROGRAM | 
| Privileges: | STD-PROCESSING | 
Function
The SHOW-MEMORY-POOL-STATUS provides information on common memory pools which currently exist in the system. Local memory pools are not displayed. The output is directed to SYSOUT. The name, scope and number of connected tasks are displayed. The TSNs of the connected tasks can also be requested.
Nonprivileged users are only ever shown the nonprivileged memory pools to which a task of their user ID is connected. Only tasks of the home user ID are listed in the list of sharer tasks.
The following options are provided to restrict the volume of information:
- Display for a particular name or name space 
- Display for a particular scope 
- Display for memory pools with particular attributes 
The maximum number of TSNs to be included in the display of the connected tasks can also be defined (the default value is 45).
The command supports structured output in S variables (see "Output in S variable").
Privileged functions
Privileged users (TSOS or SW-MONITOR-ADMINISTRATION privilege) can also obtain information on memory pools to which their own task has no connection. All sharer tasks are displayed, irrespective of the user ID. The PRIVILEGED-POOL operand is available to select privileged memory pools.
Callers with the STD-PROCESSING privilege can only obtain information on all the memory pools to which they are connected.
Format
| SHOW-MEMORY-POOL-STATUS | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 
 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Operands
POOL-NAME = *ALL / <name 1..54 with-wild>
Specifies the name of the memory pool which is to be displayed.
POOL-NAME = *ALL 
All memory pools are displayed.
POOL-NAME = <name 1..54 with-wild> 
Only the specified memory pool is displayed. When wildcards are specified, all memory pools are displayed whose name matches the wildcard string.
SCOPE = *ANY / *GROUP(...) / *USER-GROUP(...) / *GLOBAL 
Specifies whether only memory pools with a particular scope are to be displayed.
SCOPE = *ANY 
The memory pools are displayed irrespective of their scope.
SCOPE = *GROUP(...)
Only memory pools with SCOPE=GROUP are displayed.
USER-IDENTIFICATION = *ANY / *OWN / <name 1..8>
Only memory pools which were created by the specified user ID are displayed. Here *OWN identifies the user ID of the calling task. *ANY specifies that memory pools are displayed irrespective of the user ID.
SCOPE = *USER-GROUP(...) 
Only memory pools with SCOPE=USER-GROUP are displayed.
GROUP-IDENTIFICATION = *ANY / *OWN / <name 1..8>
Only memory pools which were created by the specified user ID are displayed. Here *OWN identifies the user ID to which the calling task belongs.*ANY specifies that memory pools are displayed irrespective of the user ID.
SCOPE = *GLOBAL 
Only memory pools with SCOPE=GLOBAL are displayed.
SELECT = *ALL / *PARAMETERS(...)
Specifies whether the set of memory pools defined by the POOL-NAME and SCOPE operands are to be restricted by selection criteria.
SELECT = *ALL 
The display takes place irrespective of other selection criteria.
SELECT = *PARAMETERS(...) 
Restricts the set of memory pools specified by the POOL-NAME and SCOPE operands by means of selection criteria. Only memory pools which satisfy all the subsequent criteria are to be output.
The default value *ANY means that the corresponding attribute is not a selection criterion.
CONNECTION = *ANY / *BY-USER(...) / *BY-TASK(...)
Specifies whether the memory pools are to be displayed in accordance with the connected tasks.
CONNECTION = *BY-USER(...) 
Only memory pools to which a task of the subsequently specified user ID is connected are displayed.
USER-IDENTIFICATION = *OWN / <name 1..8>
User ID of the connected task. The default *OWN specifies the caller’s user ID. Only privileged users can have memory pools displayed to which the tasks of a different user ID are connected.
CONNECTION = *BY-TASK(...) 
Only memory pools to which the specified task is connected are displayed.
TSN = *OWN / <alphanum-name 1..4>
TSN of the connected task. The default *OWN specifies the caller’s tasks.
PRIVILEGED-POOL = *ANY / *YES / *NO
This operand is available only to privileged users.
Specifies if privileged memory pools also are to be displayed.
INFORMATION = *STD / *ALL(...)
Specifies the scope of the information which is to be displayed. The default *STD displays the attributes of the memory pool and the number of connected tasks.
INFORMATION = *ALL(...) 
The attributes of the memory pool and the number of connected tasks are displayed. In addition, all connected tasks are listed with their TSNs.
NUMBER-OF-SHARERS = 45 / <integer 1..4096>
Specifies the maximum number of tasks which may be listed.
Return codes
| (SC2) | SC1 | Maincode | Meaning/Guaranteed messages | 
|---|---|---|---|
| 0 | CMD0001 | Command executed without error | |
| 1 | 0 | EMM3310 | No suitable memory pool exists in the system | 
| 2 | 0 | EMM3311 | Specified memory pool exists, but not connected | 
| 32 | EMM3312 | Internal system error | |
| 64 | CMD0216 | Required privileges for call missing | |
| 64 | EMM3313 | Specified task does not exist in the system | |
| 64 | EMM3314 | Specified user ID/group ID does not exist in the system | |
| 130 | EMM3318 | Insufficient virtual memory | 
Output format
The following attributes are displayed in one output line (if necessary with a continuation line) for each selected memory pool:
| Output field | Meaning | 
|---|---|
| POOL-NAME | Name of the memory pool | 
| SCOPE | Scope of the memory pool, displayed with GLOBAL, GROUP or USER-GROUP | 
| USER-ID | Only when SCOPE=*GROUP:  | 
| GROUP-ID | Only when SCOPE=*USER-GROUP:  | 
| NUMBER-OF-SHARERS | Number of connected tasks | 
| LIST-OF-SHARERS | Output only when INFORMATION=*ALL:  | 
Output in S variable
The SCOPE and INFORMATION operands of the command identify the S variables which are to be created.
| Output information | Name of the S variable | T | Contents | Condition | 
|---|---|---|---|---|
| Group name under which the memory pool was created | var(*LIST).GROUP-ID | S | <c-string 1..8> | SCOPE=  | 
| Number of connected tasks | var(*LIST).NUM-OF-SHARER | I | <integer 1..4096> | |
| Name of the memory pool | var(*LIST).POOL-NAME | S | <c-string 1..54> | |
| Scope of the memory pool | var(*LIST).SCOPE | S | *GLOBAL | |
| TSN of the connected task | var(*LIST).TASK(*LIST) | S | <c-string 4..4> | INF=*ALL | 
| User ID under which the memory pool was created | var(*LIST).USER-ID | S | <c-string 1..8> | SCOPE=  | 
Example
/sh-mem-pool inf=*all
POOL-NAME          DISK10#SIMVOL#MP
SCOPE              GROUP
USER-ID            K60
NUMBER-OF-SHARERS  3
LIST-OF-SHARERS    4WCZ  4WCY  4WCX
POOL-NAME          PASCALXT#MEMORYPOOL#V21A00
SCOPE              GLOBAL
NUMBER-OF-SHARERS  15
LIST-OF-SHARERS    0S4N  0S39  0S38  0S37  0S4F  0S4H  0S5I  0S5M  0S5N
                   0S4C  0S4K  0S4L  0S5H  0S6I  0S7K
POOL-NAME          DBSWNMBACOMMONPL0003
SCOPE              USER-GROUP
GROUP-ID           MBASE
NUMBER-OF-SHARERS  2
LIST-OF-SHARERS    20L2  20KT