IFAQUERY — SMF configuration query service

Description

The IFAQUERY service provides SMF configuration information to its caller. The IFAQUERY service currently performs the following function:
  • RETRIEVE STATUS - Return the status of SMF recording. Information about SMF LOGSTREAMs is returned, including the SMF record types being written to the log stream. When SMF is not recording, a non-zero return code is returned.

Environment

The requirements for the caller are:

Environmental factor Requirement
Minimum authorization: Supervisor state and system PSW key.
Dispatchable unit mode: Task mode
Cross Memory Mode: PASN=HASN=SASN
AMODE: 31-bit
ASC mode: Primary or access register (AR)
Interrupt status: Enabled or disabled for I/O and external interrupts
Locks: No locks held
Control parameters: Control parameters must be in the primary address space.

Programming requirements

None.

Restrictions

None.

Input register information

There are no input register requirements for issuing the IFAQUERY macro.

Output register information

When control returns to the caller, the GPRs contain:
Register
Contents
0
Reason code
1
Used as a work register by the system
2-13
Unchanged
14
Used as a work register by the system
15
Return code
When control returns to the caller, the ARs contain:
Register
Contents
0-1
Used as work registers by the system
2-13
Unchanged
14-15
Used as work registers by the system

Performance implications

None.

Syntax

The standard form of the IFAQUERY macro is written as follows:

Syntax Description
   
   name name: symbol. Begin name in column 1.
   
One or more blanks must precede IFAQUERY.
   
IFAQUERY  
   
One or more blanks must follow IFAQUERY.
   
[,xlabel] An optional symbol, starting in column 1, that is the name on the IFAQUERY macro invocation. DEFAULT: No name
 RETRIEVE  
    ,STATUS  
       ,OUTAREA=outarea xoutarea: RS-type address or register (2) - (12).
       ,OUTLEN=outlen outlen: RS-type address or register (2) - (12).
[,DETAILS=LOGSTREAM] Default: ALL
   
[,RETCODE=retcode] retcode: RS-type address or register (2) - (12).
[,RSNCODE=rsncode] rsncode: RS-type address or register (2) - (12).
   
[,PLISTVER=plistver|IMPLIED_VERSION] Default: IMPLIED_VERSION
   
[,MF=S] Default: MF=S
[,MF=(L,mfctrl,mfattr, 0D)]  
[,MF=(E,mfctrl,COMPLETE)]  
   

Parameters

In the following set of mutually exclusive keywords, only one keyword must be specified.
RETRIEVE
Retrieve SMF Recording information.
STATUS
Obtain information about the current log stream recording environment.
OUTAREA=outarea
A required character input/output specifying an area to contain the data being returned by IFAQUERY. The answer area is defined by the IFAQUAA macro, which consists of the QUAHDR and QUALSI structures. The IFAQUAA mapping macro provides the format of the area. The area can be in the primary address space or in an address space or data space that is addressable through a public entry on the caller's DU-AL. Use the OUTLEN parameter to specify the length of the area.

To code: Specify the RS-type address of a character field, or register (2) - (12) (ASM only).

OUTLEN=outlen
A required fullword input parameter that contains the length of the area provided to contain the data being returned by IFAQUERY.

To code: Specify the RS-type address of a fullword field, or register (2) - (12) (ASM only).

End of the mutually exclusive keywords.
DETAILS=LOGSTREAM
An optional keyword input indicating the type of information that the SMF query service should return.

DEFAULT: LOGSTREAM.

RETCODE=retcode
An optional output parameter into which the return code is to be copied from GPR 15.

To code: Specify the RS-type address of a fullword field, or register (2) - (12) (ASM only).

RSNCODE=rsncode
An optional output parameter into which the reason code is to be copied from GPR 0.

To code: Specify the RS-type address of a fullword field, or address in register (2) - (12) (ASM only).

PLISTVER=plistver|IMPLIED_VERSION
An optional byte input decimal value in the "0-0" range that specifies the macro version. PLISTVER is the only parameter allowed on the list form of MF. This parameter determines which parameter list the system generates. PLISTVER is an optional input parameter on all forms of the macro, including the list form. When using PLISTVER, specify it on all macro forms used for a request and with the same value on all of the macro forms. The values can be:
  • IMPLIED_VERSION, which is the lowest version that allows all parameters specified on the request to be processed. If you omit the PLISTVER parameter, IMPLIED_VERSION is the default.
  • MAX, if you want the parameter list to be the largest size currently supported. This size might grow from release to release and affect the amount of storage that your program needs.

    If you can tolerate the size change, IBM® suggests that you always specify PLISTVER=MAX on the list form of the macro. Specifying MAX ensures that the list-form parameter list is always long enough to hold all the parameters you might specify on the execute form, when both are assembled with the same level of the system. In this way, MAX ensures that the parameter list does not overwrite nearby storage.

  • 1, if you use the currently available parameters.
To code: Specify one of the following:
  • IMPLIED_VERSION
  • MAX
  • 1
,MF=S
,MF=(L,mfctrl,mfattr, 0D)
MF=(E,fctrl,COMPLETE
An optional keyword input that specifies the macro form.

Use MF=S to specify the standard form of the macro, which builds an inline parameter list and generates the macro invocation to transfer control to the servIice. MF=S is the default.

Use MF=L to specify the list form of the macro. Use the list form together with the execute form of the macro for applications that require reentrant code. The list form defines an area of storage that the execute form uses to store the parameters. Only the PLISTVER parameter may be coded with the list form of the macro.

Use MF=E to specify the execute form of the macro. Use the execute form together with the list form of the macro for applications that require reentrant code. The execute form of the macro stores the parameters into the storage area defined by the list form, and generates the macro invocation to transfer control to the service.

,fctrl
The name of a storage area to contain the parameters. For MF=S and MF=E, this can be an RS-type address or an address in register (1) - (12).
mfattr
An optional 1- 60-character input string that you use to force boundary alignment of the parameter list. Use a value of 0F to force the parameter list to a word boundary, or 0D to force the parameter list to a doubleword boundary. If you do not code attr, the system provides a value of 0D.
COMPLETE
Specifies that the system is to check for required parameters and supply defaults for omitted optional parameters.

ABEND codes

None.

Return and reason codes

The following table contains hexadecimal return and reason codes, the equate symbols associated with each reason code, and the meaning for each return and reason code.

Table 1. Return and Reason Codes for the IFAQUERY Macro
Return Code Reason Code Meaning and Action
00 None

Explanation: IFAQUERY request successful.

04  

Explanation: Warning. Refer to the action provided with the specific reason code.

04 xxxxxx01

Explanation: OUTAREA is too small to contain all the requested data. The results in the OUTAREA were truncated. QUAHLEN specifies the amount of storage that is required to return a complete result.

Action: Try the request again with a larger OUTAREA.

04 xxxxxx03

Explanation: DETAILS=LOGSTREAM was requested but no log stream information exists. The QUAHDR is filled in appropriately. No records are returned.

Action: None.

08  

Explanation: Incorrect input parameter. Refer to the action provided with the specific reason code.

08 xxxxxx01

Explanation: Caller was not running as a task.

Action: Move the invocation of IFAQUERY under a task.

08 xxxxxx02

Explanation: The input parmlist cannot be accessed.

Action: Check for one of the following possible errors:
  • Program exception during access of parameter list.
  • Parameter list has incorrect address.
08 xxxxxx03

Explanation: The QUAA area could not be accessed.

Action: Check for one of the following possible errors:
  • Program exception during access of QUAA area.
  • QUAA area has incorrect address.
08 xxxxxx05

Explanation: The OUTAREA length is too small for a QUAA header.

Action: Increase the size of the OUTAREA. The length must be greater than or equal to 16 bytes.

08 xxxxxx06

Explanation: QUAA has invalid ALET.

0C  

Explanation: Environmental error. Refer to the action provided with the specific reason code.

0C xxxxxx01

Explanation: SMF recording is not active. No records are returned.

Action: None.

0C xxxxxx02

Explanation: Storage for local area was not obtained.

Action: None.

10 None

Explanation: Unexpected error. The state of the request is unpredictable.