ITZQUERY — Transaction trace query

Description

The ITZQUERY macro is used to query whether a transaction or work unit should be traced.

Environment

The requirements for the caller are:

Environmental factor Requirement
Minimum authorization: Problem state. PSW key 8 - 15
Dispatchable unit mode: Task or SRB
Cross memory mode: Any PASN, any HASN, any SASN
AMODE: 31-bit
ASC mode: Primary
Interrupt status: Enabled for I/O and external interrupts
Locks: No locks may be held
Control parameters: Control parameters must be in the primary address space.

Programming requirements

Any module that invokes this macro must include the CVT and IHAECVT macros.

Restrictions

None.

Input register information

Before issuing the ITZQUERY macro, the caller must insure that the following general purpose registers (GPRs) contain the specified information:
Register
Contents
13
The address of a 72-byte standard save area in the primary address space

Before issuing the ITZQUERY macro, the caller does not have to place any information into any access register (AR).

Output register information

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

Some callers depend on register contents remaining the same before and after issuing a macro. If the macro changes the contents of registers on which the caller depends, the caller must save them before issuing the macro and restore them after the macro returns control.

Performance implications

Specifying the MONTKN in a monitoring environment results in a faster query.

Syntax

The ITZQUERY macro is written as follows:

Syntax Description
   
   name name: symbol. Begin name in column 1.
   
One or more blanks must precede ITZQUERY.
   
ITZQUERY  
   
One or more blanks must follow ITZQUERY.
   
   ,MONTKN=montkn montkn: RS-type address
   ,MONTKN=0 Default: MONTKN=0
   
,TRACETKN=tracetkn tracetkn: RS-type address
   
   ,TRACELVL=tracelvl tracelvl: RS-type address
   
   ,PLISTVER=  
    IMPLIED_VERSION Default: PLISTVER=IMPLIED_VERSION
   ,PLISTVER=MAX  
   ,PLISTVER=0  
   
   ,MF=S Default: MF=S
   ,MF=(L,list addr) list addr: RS-type address or register (1) - (12)
   ,MF=(L,list addr,attr)  
   ,MF=(L,list addr,0D)  
   ,MF=(E,list addr)  
   ,MF=(E,list addr,COMPLETE)  
   ,MF=(E,list addr,NOCHECK)  
   ,MF=(M,list addr)  
   ,MF=(M,list addr,COMPLETE)  
   ,MF=(M,list addr,NOCHECK)  
   

Parameters

The parameters are explained as follows:

name
This is an optional symbol, starting in column 1, that is the name on the ITZQUERY macro invocation. The name must conform to the rules for an ordinary assembler language symbol.
,MONTKN=montkn
MONTKN=0
An optional input parameter that is the token used to locate the current monitoring environment.

It is recommended that MONTKN be specified for a monitoring environment to keep the query pathlength short and fast. The default is 0.

To code: Specify the RS-type address of a fullword field.

,TRACETKN=tracetkn
This is a required output parameter that specifies the transaction trace token returned from query.

To code: Specify the RS-type address of a 32-character field.

Note: Some existing components and products may have difficulty finding space in their data areas to hold a 32-byte transaction trace token. Apply APAR OW50696 to shorten the significant portion of the token to 8 bytes. With service for OW50696 applied, only the first 8 bytes of the 32-byte token will contain values other than binary zeros. Components that might not be able to exploit component trace due to the size of the 32-byte token may save just the first 8 bytes between uses, expanding it for use with transaction trace APIs by padding with binary zeros.
,TRACELVL=tracelvl
This is an optional output parameter that specifies the transaction trace indicator returned from query. A non-zero value implies that this work unit is eligible for tracing. A value of zero implies that this work unit is not eligible for tracing. In that case, the trace token is also set to zero.

To code: Specify the RS-type address of a one-byte field.

,PLISTVER=IMPLIED_VERSION
,PLISTVER=MAX
,PLISTVER=0
This is an optional input parameter that specifies the version of the macro. PLISTVER 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 are:
IMPLIED_VERSION
This 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
Specify MAX if you want the parameter list to be the largest size currently possible. This size might grow from release to release and affect the amount of storage your program needs.

If you can tolerate the size change, IBM® recommends 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 of the macro 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.

0
Specify 0 if you use the currently available parameters.
To code: Specify one of the following:
  • IMPLIED_VERSION
  • MAX
  • A decimal value of 0
,MF=S
,MF=(L,list addr)
,MF=(L,list addr,attr)
,MF=(L,list addr,0D)
,MF=(E,list addr)
,MF=(E,list addr,COMPLETE)
,MF=(E,list addr,NOCHECK)
,MF=(M,list addr)
,MF=(M,list addr,COMPLETE)
,MF=(M,list addr,NOCHECK)
This is an optional input parameter 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 service. 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.

Use MF=M together with the list and execute forms of the macro for service routines that need to provide different options according to user-provided input. Use the list form to define a storage area; use the modify form to set the appropriate options; then use the execute form to call the service.
  • Use ITZQUERY ...MF=(M,list-addr,COMPLETE) specifying appropriate parameters, including all required ones.
  • Use ITZQUERY ...MF=(M,list-addr,NOCHECK), specifying the parameters that you want to change.
  • Use ITZQUERY ...MF=(E,list-addr,NOCHECK), to execute the macro.
,list addr
The name of a storage area to contain the parameters. For MF=S, MF=E, and MF=M, this can be an RS-type address or an address in register (1)-(12).
,attr
An optional 1- to 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.
,NOCHECK
Specifies that the system is not to check for required parameters and is not to supply defaults for omitted optional parameters.

ABEND codes

None.

Return and reason codes

When the ITZQUERY macro returns control to your program, GPR 15 contains a return code.

The following table identifies the hexadecimal return and reason codes and the equate symbol associated with each reason code.

Table 1. Return and Reason Codes for the ITZQUERY Macro
Equate Symbol Meaning and Action  
0 Equate Symbol: ITZGOOD

Meaning: Success.

Action: Trace this work unit. Trace token is non-zero.

4 Equate Symbol: ITZNOTR

Meaning: Work unit not to be traced.

Action: Do not trace this work unit.