IFAMQRY — Query SMF in-memory resources

Call the IFAMQRY service to query the SMF in-memory resources that are available to the application.

Description

Your application can call the IFAMQRY service to determine which SMF in-memory resources are available. Only those in-memory resources that are available to this caller, as determined by SAF, access are returned.

Note: The returned data represents point-in-time information that is subject to change because of configuration changes before a call to IFAMCON is made. Results are determined based on the caller's access to the data.

Environment

The requirements for the caller are:

Requirement Details
Minimum authorization: Supervisor state or problem state, any PSW key
Dispatchable unit mode: Task
Cross memory mode: PASN = HASN
AMODE: 64-bit
ASC mode: Primary
Interrupt status: Enabled for I/O and external interrupts
Locks: No locks held

Programming requirements

The caller must include the IFAZSYSP macro to get a mapping of the query parameter block. The caller should include the IFARCINM macro to get equate symbols for the return and reason codes.

Authorization

None.

Restrictions

None.

Syntax

Write the call as shown in the following syntax diagram. You must code all parameters on the CALL statement in the order shown.

Call IFAMQRY (
               QryParmBlock,
               rc,
               rsn);

For assembler programming, the stub routine for this callable service resides in SYS1.CSSLIB.

Parameters

The parameters are explained as follows:

QryParmBlock
A query parameter block.
Direction: Input/output
Type: Query parameter block
The query parameter block has the following format and is mapped by the IFAZSYSP macro in SYS1.MACLIB:
Decimal offset Length Type Field Description
0 4 EBCDIC ID ID with value of QRPB
4 2 binary Length Total length of the query parameter block
6 1 binary Unused Unused; must be zero
7 1 binary Version Parameter block version number (X'01')
8 2 binary Flags The following flags are supported:
Value
Meaning
1
Request return of extended types. When on, the output area will be mapped by QrPbX_InMemResource_Ext
2 - 15
Unused, must be zero
8 4 binary Unused Unused; must be zero
10 2 binary Unused Unused; must be zero
12 4 binary Returned Imrs Number of returned in-memory resources
16 4 binary Buffer size Size of the output buffer that is to contain the information for the returned in-memory resources
20 4 binary Unused Unused; must be zero
24 8 binary Buffer address Address of the output buffer that is to contain the information for the returned in-memory resources
Each in-memory resource returned in the output buffer (pointed to by the address in the buffer address field) has the following format:
Decimal offset Length Type Field Description
0 2 binary Name length Length of the name
2 26 EBCDIC Name Name of the in-memory resource, padded with blanks
28 32 binary Types Bit mask (0 - 255 bit array) of SMF record types that are available from this in-memory resource
60 8 binary Reserved Reserved
rc
The return code from the service.
Direction: Output
Type: 4-word integer
rsn
The reason code from the service.
Direction: Output
Type: 4-word integer

ABEND codes

IFAMQRY might abnormally end with system completion code X'353'. See z/OS MVS System Codes for an explanation and programmer response.

Related services

Return and reason codes

When the service returns control to the caller, the rc parameter contains a hexadecimal return code and the rsn parameter contains a hexadecimal reason code, as listed in Table 1. The return code and reason code symbols are mapped by the IFARCINM macro.

Table 1. Return and reason codes for the IFAMQRY service
Return code
Equate symbol
Reason code
Equate symbol
Meaning and action
X'00'
IFAINMRetCodeOK
X'0000'
IFAINMRsnCodeOK
Meaning: Successful completion.
Action: None.
X'08'
IFAINMRetCodeError
X'0801'
IFAINMBadMode
Meaning: The caller is running in an incorrect mode for one or more of the following reasons:
  • The caller is not running in task mode.
  • The caller is in cross-memory mode.
  • The caller is holding a lock.
Action: Change the program to run under a task in PASN = HASN mode with no locks held.
X'08'
IFAINMRetCodeError
X'0802'
IFAINMBadParmlist
Meaning: The parameter block is not accessible or has an incorrect format.
Action: Correct the program to pass a valid parameter block.
X'08'
IFAINMRetCodeError
X'0805'
IFAINMUnSupported
Meaning: The caller is attempting to pass unsupported options in the parameter block.
Action: Initialize all unused fields in the parameter block to zero.
X'08'
IFAINMRetCodeError
X'0808'
IFAINMNotEnoughQrySp
Meaning: There is not enough space in the output buffer to hold all of the in-memory resources available to the caller.
Action: Call the IFAMQRY service with an output buffer that is large enough to contain the data.
X'0C'
IFAINMRetCodeEnvErr
X'0C02'
IFAINMSMFNotActive
Meaning: SMF is not active.
Action: None.
X'0C'
IFAINMRetCodeEnvErr
X'0C03'
IFAINMObtainFailure
Meaning: The system was unable to obtain storage to generate in-memory data in response to a request.
Action: None.
X'10'
IFAINMRetCodeFatal
Not applicable
Meaning: Internal error.
Action: Contact the IBM Support Center.