IXGQUERY — Query a log stream for information

Description

The IXGQUERY macro allows a user to retrieve information about a log stream or system logger parameter information.

Environment

The requirements for the caller are:

Environmental factor Requirement
Minimum authorization: Problem state. Any PSW key
Dispatchable unit mode: Task
Cross memory mode: Any PASN, any HASN, any SASN
AMODE: 31-bit or 64-bit
ASC mode: Primary or access register (AR)
Interrupt status: Enabled for I/O and external interrupts
Locks: No locks may be held.
Control parameters: None.

Programming requirements

  • The parameter list for this service must be addressable in the caller's primary address space.
  • Include the IXGCON mapping macro in your program. This macro provides a list of equate symbols for the system logger services.
  • Include mapping macro IXGANSAA in your program. This macro shows the format of the answer area output returned for each system logger service in the ANSAREA parameter.
When coding REQUEST=LSCONNINFO or when using default:
  • The caller must have a valid connection to the log stream.
  • The current primary address space must be the same as the HOME address space at the time you issued the IXGCONN macro.
  • Include mapping macro IXGQBUF in your program when CHECKCONNSTATUS=NO is specified. This macro shows the format of the data returned by IXGQUERY.
When coding REQUEST=ZAILOCINFO:
  • The current primary address space must be the same as the HOME address space, unless a log stream connection (IXGCONN connect) request was previously performed from the primary address space.
  • Include mapping macro IXGQZBUF in your program. This macro shows the format of the data returned by IXGQUERY.

Restrictions

  • The caller's output buffer (see BUFFER and BUFFER64) must be in the caller's primary address space and cannot be ALET-qualified.
  • All storage areas specified must be in the same storage key as the caller.
  • The caller cannot have any enabled, unlocked task (EUT) FRRs established.
  • There is more than one version of this macro available. The parameters you can use depend on the version you specify on the PLISTVER parameter. See the description of the PLISTVER parameter for more information.
  • You can call any of the system logger services in either AMODE 31 or 64, but the parameter list and all other data addresses, with the exception of BUFFER64 must reside in 31-bit storage.

Input register information

Before issuing the IXGQUERY macro, the caller does not have to place any information into any register unless using it in register notation for a particular parameter, or using it as a base register.

Output register information

When control returns to the caller, the GPRs contain:
Register
Contents
0
Reason code, if register 15 contains a non-zero return code
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 a work register by the system
2-13
Unchanged
14-15
Used as a work register by the system
64 Bit Register Usage
If the caller is in Amode 64, then 64-bit register 15 will be altered. If the caller uses Buffer64, then 64-bit registers 0, 1, and 15 may be altered.

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

Performance implications

None.

Syntax

The IXGQUERY macro is written as follows:

Syntax Description
   
   name name: symbol. Begin name in column 1.
   
One or more blanks must precede IXGQUERY.
   
IXGQUERY  
   
One or more blanks must follow IXGQUERY.
   
REQUEST=LSCONNINFO Default: LSCONNINFO
   
STREAMTOKEN=xstreamtoken xstreamtoken: RS-type address or address in register (2) - (12).
   
CHECKCONNSTATUS=NO Default: NO
,BUFFER=xbuffer xbuffer: RS-type address or address in register (2) - (12).
,BUFFLEN=xbufflen xbufflen: RS-type address or address in register (2) - (12).
CHECKCONNSTATUS=YES  
   
REQUEST=ZAILOCINFO  
,BUFFER64=xbuffer64 xbuffer64: RS-type address or address in register (2) - (12).
,BUFFLEN=xbufflen xbufflen: RS-type address or address in register (2) - (12).
   
,ANSAREA=ansarea ansarea: RS-type address or address in register (2) - (12).
   
,ANSLEN=anslen anslen: RS-type address or address in register (2) - (12).
   
  ,RETCODE=retcode retcode: RS-type address or register (2) - (12).
   
  ,RSNCODE=rsncode rsncode: RS-type address or register (2) - (12).
   
  ,PLISTVER=IMPLIED_VERSION Default: PLISTVER=IMPLIED_VERSION
  ,PLISTVER=MAX  
  ,PLISTVER=0  
  ,PLISTVER=1  
  ,PLISTVER=2  
   
  ,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
An optional symbol, starting in column 1, that is the name on the IXGQUERY macro invocation. The name must conform to the rules for an ordinary assembler language symbol.
REQUEST=LSCONNINFO|ZAILOCINFO
An optional keyword input that specifies the type of system logger related information being requested.

DEFAULT: LSCONNINFO

REQUEST=LSCONNINFO
The program requests to obtain information for a connected log stream.
STREAMTOKEN=streamtoken
A required input parameter that specifies the log stream token that was returned by the IXGCONN service.

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

CHECKCONNSTATUS=NO|YES
An optional keyword input that indicates whether or not only the connection status of the log is to be checked.

DEFAULT: NO

CHECKCONNSTATUS=NO
Indicates that full IXGQUERY processing is to be performed.
,BUFFER=buffer
A required output parameter that specifies the buffer into which the requested data are to be copied. The contents of the buffer are mapped by IXGQBUF.

The buffer cannot be ALET qualified.

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

,BUFFLEN=bufflen
A required input parameter that specifies the size of the buffer, identified by the BUFFER keyword, relative to different output versions:

If you want to see the GROUP information specified for the log stream, you must specify at least 200 bytes. If you specify less than 200 bytes, IXGQUERY will not return the GROUP information.

If the user-specified buffer is less than 72 bytes, the query request will fail and a specific return or reason code (IxgRetCodeError, IxgRsnCodeBadBufSize) will be returned.

If the user-specified buffer is greater than or equal to 88 bytes, version one information will be returned.

If the user-specified buffer is greater than or equal to 168 bytes, version two information will be returned.

If the user-specified buffer is greater than or equal to 200 bytes, version three information will be returned. If you want to see the GROUP information specified for the log stream, you must specify at least 200 bytes. If you specify less than 200 bytes, IXGQUERY will not return the GROUP information.

See IXGQBUF in z/OS MVS Data Areas in z/OS Internet Library at http://www.ibm.com/systems/z/os/zos/bkserv/ for details.

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

CHECKCONNSTATUS=YES
Indicates only the connection status of the log stream is to be checked.
REQUEST=ZAILOCINFO
The program requests to obtain information for the system logger ZAI parameter options pertaining to the IBM zAware server location.
,BUFFER64=xbuffer64
A required output parameter that specifies the buffer (starting on a full word boundary) into which the requested data are to be copied. The location of this buffer may be anywhere in 64-bit storage.

The contents of the buffer are mapped by IXGQZBUF.

The buffer cannont be ALET qualified.

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

,BUFFLEN=bufflen
A required input parameter that specifies the size of the buffer, identified by the BUFFER64 keyword, relative to different output versions:
  • If the user-specified buffer is less than 96 bytes, the query request will fail and a specific return or reason code (IxgRetCodeError, IxgRsnCodeBadBufSize) will be returned.
  • If the user specified buffer is greater than or equal to 96 bytes, then version one information will be returned.

See IXGQZBUF in z/OS MVS Data Areas in z/OS Internet Library at http://www.ibm.com/systems/z/os/zos/bkserv/ for details.

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

,ANSAREA=ansarea
A required input parameter of a virtual storage area, called the answer area. The ANSAREA contains additional error status when the IXGQUERY service generates an error return code. The format of the returned data is defined by the IXGANSAA mapping macro.

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

,ANSLEN=anslen
A required input parameter that contains the length in bytes of the virtual storage area provided for ANSAREA.

The length of the answer area is described by the IXGANSAA mapping macro.

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

,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).

,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 register (2)-(12).

,PLISTVER=IMPLIED_VERSION
,PLISTVER=MAX
,PLISTVER=0
,PLISTVER=1
,PLISTVER=2
An optional input parameter that specifies the version of the macro. PLISTVER determines which parameter list the system generates.
The values are:
  • 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. Note that on the list form, the default will cause the smallest parameter list to be created.
  • 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 that 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 when both forms are assembled using the same level of the system. In this way, MAX ensures that the parameter list does not overwrite nearby storage.

  • 0, which supports all parameters except those referenced in higher versions.
  • 1, which supports both the following parameters and parameters from version 0:
    • CHECKCONNSTATUS
    • REQUEST
  • 2, which supports both the following parameters and parameters from version 0 and 1:
    • BUFFER64
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)
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 can be specified on the list form of the macro. IBM recommends that you always specify PLISTVER=MAX on 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.

IBM recommends that you use the modify and execute forms in the following order:
  • Use MF=(M,list_addr,COMPLETE), specifying appropriate parameters, including all required ones.
  • Use MF=(M,list_addr,NOCHECK), specifying the parameters you want to change.
  • Use MF=(E,list_addr,NOCHECK), to execute the macro.
,list addr
The name of a storage area to contain the parameters.
,attr
An optional 1- to 60-character input string, which can contain any value that is valid on an assembler DS pseudo-op. You can use this parameter to force boundary alignment of the parameter list. If you do not code attr, the system provides a value of 0D, which forces the parameter list to a doubleword boundary.
,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

The IXGQUERY service can issue abend X'1C5' with reason code X'0805'. This abend indicates an abend during system logger processing. If you receive this abend, reissue the request. If the problem persists, contact the IBM Support Center.

Return and reason codes

When the IXGQUERY macro returns control to your program:
  • GPR 15 (and retcode, if you coded RETCODE) contains a return code.
  • When the value in GPR 15 is not zero, GPR 0 (and rsncode, if you coded RSNCODE) contains a reason code.
00
IxgRetCodeOk - Successful completion
04
IxgRetCodeWarning - The request was processed successfully, however a warning condition was encountered.
08
IxgRetCodeError - An error has been encountered. The associated reason code provides more information.
0C
IxgRetCodeCompError - A system logger component error has been encountered.

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

Table 1. Return and Reason Codes for the IXGQUERY Macro
Return Code Reason Code Meaning and Action
00 xxxx0000 IxgRsnCodeOk -

Explanation: Request processed successfully.

08 xxxx0801 IxgRsnCodeBadParmlist -

Explanation: Program error. The parameter list is not valid. Either the parameter list storage is inaccessible, or the version of the macro used was not valid.

Action: Ensure that the storage area for the parameter list is accessible to the system logger for the duration of the request, and that the macro version is correct. The parameter list storage must be addressable in the caller's primary address space and in the same key as the caller.

08 xxxx0802 IxgRsnCodeXESError -

Explanation: System error. A severe cross-system extended services (XES) error has occurred.

Action: In the answer area mapped by IXGANSAA, see ANSAA_DIAG1 for the XES return code and ANSAA_DIAG2 for the XES reason code.

08 xxxx0803 IxgRsnCodeBadBuffer -

Explanation: The virtual storage area specified by the BUFFER keyword not addressable.

Action: Ensure the storage area is accessible to the Logger Services for the duration of the request.

08 xxxx0806 IxgRsnCodeBadStmToken -
Explanation: Program error. One of the following occurred:
  • The stream token was not valid.
  • The specified request was issued from an address space other than the connectors address space.
Action: Do one of the following:
  • Make sure that the stream token specified is valid.
  • Ensure that IXGQUERY requests were issued from the connectors address space.
08 xxxx080A IxgRsnCodeRequestLocked -

Explanation: Program error. The program issuing the request is holding a lock.

Action: Ensure that the program issuing the request is not holding a lock.

08 xxxx080F IxgRsnCodeBadBufsize -

Explanation: The buffer specified (BUFFER or BUFFER64) is not large enough to contain the data being returned. No data is returned.

Action: Obtain a buffer of the length of IXGQBUF or IXGQZBUF (as appropriate) and retry the request.

08 xxxx0814 IxgRsnCodeNotAvailForIPL -

Explanation: Environment error. The system logger address space is not available for the remainder of this IPL. The system issues messages about this error during system logger initialization.

Action: See the explanation for system messages issued during system logger initialization.

08 xxxx0815 IxgRsnCodeNotEnabled -

Explanation: Program error. The program issuing the request is not enabled for I/O and external interrupts, so the request fails.

Action: Make sure the program issuing the request is enabled for I/O and external interrupts.

08 xxxx0816 IxgRsnCodeBadAnslen -

Explanation: Program error. The answer area length (ANSLEN parameter) is not large enough. The system logger returned the required size in the Ansaa_Preferred_Size field of the answer area, mapped by IXGANSAA macro.

Action: Reissue the request, specifying an answer area of the required size.

08 xxxx0817 IxgRsnCodeBadAnsarea -

Explanation: Program error. The storage area specified on the ANSAREA parameter cannot be accessed. This may occur after the system logger address space has terminated.

Action: Specify storage that is in the callers primary address space and in the same key as the calling program at the time the system logger service was issued. This storage must be accessible until the request completes.

08 xxxx0819 IxgRsnCodeSRBMode -

Explanation: Program error. The calling program is in SRB mode, but task mode is the required dispatchable unit mode for this system logger service.

Action: Make sure the calling program is in task mode.

08 xxxx081B IxgRsnCodePrimaryNotHome -

Explanation: Program error. The primary address space does not equal the home address space.

Action: Either make sure that the primary address space equals the home address space when issuing this type of system logger service or perform a log stream connection (IXGCONN connect) request from the same primary address space and then reissue the IXGQUERY request.

08 xxxx082D IxgRsnCodeExpiredStmToken -

Explanation: Environment error. The stream token is no longer valid because the connector has been disconnected.

Action: Reconnect to the logstream before issuing any functional requests.

08 xxxx0840 IxgRsnCodeBadVersion -

Explanation: Environment error. The parameter list passed to the service routine has an incorrect version indicator.

Action: Make sure that the level of MVS™ executing the request and the macro library used to compile the invoking routine are compatible.

08 xxxx0861 IxgRsnCodeRebuildInProgress -

Explanation: Environment error. No requests can be processed for this log stream because a coupling facility structure rebuild is in progress for the structure associated with this log stream.

Action: Listen for ENF signal 48 that will indicate one of the following:
  • The log stream is available because the rebuild completed successfully. Reissue the request.
  • The rebuild failed and the log stream is not available.
08 xxxx0862 IxgRsnCodeXESPurge -

Explanation: Environment error. An cross-system extended services (XES) request has been purged due to rebuild processing.

Action: Listen for ENF signal 48 that will indicate one of the following:
  • The log stream is available because the rebuild completed successfully. Reissue the request.
  • The rebuild failed and the log stream is not available.
08 xxxx0863 IxgRsnCodeStructureFailed -

Explanation: Environment error. Either the coupling facility structure associated with the log stream has failed or the coupling facility itself has failed.

Action: Listen for ENF signal 48 that will indicate one of the following:
  • The log stream is available because the rebuild completed successfully. Reissue the request.
  • The rebuild failed and the log stream is not available.
08 xxxx0864 IxgRsnCodeNoConnectivity -

Explanation: Environment error. No connectivity exists to the coupling facility associated with the log stream. The system logger will either attempt to rebuild the log stream in another coupling facility or the log stream will be disconnected.

Action: Listen for ENF signal 48 that will indicate one of the following:
  • The log stream is available because the rebuild completed successfully. Reissue the request.
  • The rebuild failed and the log stream is not available.
  • The log stream has been disconnected from this system.

If a rebuild initiated because of a loss of connectivity previously failed, an ENF corresponding to this reason code might not be issued. Further action by the installation might be necessary to cause the change of the log stream status again. Check the log for messages IXG101I, IXG107I and related rebuild messages for information on resolving any outstanding issues.

08 xxxx0890 IxgRsnCodeAddrSpaceNotAvail -

Explanation: System error. The system logger address space failed and is not available.

Action: Do not issue system logger requests.

08 xxxx0891 IxgRsnCodeAddrSpaceInitializing -

Explanation: System error. The system logger address space is not available because it is IPLing.

Action: Listen for ENF signal 48, which will indicate when the system logger address space is available. Once it's available, reconnect to the log stream, then reissue this request. You can also listen for ENF signal 48, which will indicate if the system logger address space will not be available for the life of the IPL. In that case, do not issue system logger services.

08 xxxx08D3 IxgRsnCodeFuncNotSupported -

Explanation: Environment error. The query request failed because the LOGR couple data set is not at the correct level. The inventory must be at least at the OS390R3 level.

0C xxxx0000 Equate Symbol: IxgRetCodeCompError
Explanation: User or System error. One of the following occurred:
  • You issued the FORCE IXGLOGR,ARM command to terminate the system logger address space.
  • System logger component error occurred.

Action:If this reason code is not the result of forcing the system logger address space, search problem reporting data bases for a fix for the problem. If no fix exists, contact the IBM Support Center. Provide the diagnostic data in the answer area (IXGANSAA) and any dumps or LOGREC entries from system logger.

Examples

Example 1:

Issue IXQUERY to get information about a log stream.
         IXGQUERY STREAMTOKEN=OTOKEN,                                  @
               BUFFER=QRYBUFF,                                         @
               BUFFLEN=QRYBUFF_LEN,                                    @
               ANSAREA=XANSAREA,                                       @
               ANSLEN=XANSLEN,                                         @
               RSNCODE=RSCODE
OTOKEN   DS    CL16                    Output Stream token
QRYBUFF  DS    CL(QBUF_LEN)            IXGQUERY data area
QRYBUFF_LEN DC A(QBUF_LEN)             IXGQUERY data length
XANSAREA DS    CL(ANSAA_LEN)           Logger answer area
XANSLEN  DC    A(ANSAA_LEN)            Answer area length
RSCODE   DS    F                       Reason code
         DSECT  ,
         IXGQBUF  ,                    The macro for IXGQUERY data
         IXGANSAA ,                    The answer area macro

Example 2:

Issue IXQUERY to get system logger ZAI location (version 1) parameter information.
         IXGQUERY REQUEST=ZAILOCINFO,                                  +
               BUFFER64=QRYZAIBUFF,                                    +
               BUFFLEN=QRYZAIBUFF_LEN,                                 +
               ANSAREA=XANSAREA,                                       +
               ANSLEN=XANSLEN,                                         +
               RSNCODE=RSCODE                                           
QRYZAIBUFF    DS  CL(IXGQZBUF_VERS1_LENGTH)      output buffer          
QRYZAIBUFF_LEN DC  A(IXGQZBUF_VERS1_LENGTH)       buffer size           
XANSAREA DS    CL(ANSAA_LEN)                     Logger answer area     
XANSLEN  DC    A(ANSAA_LEN)                      Answer area length     
RSCODE   DS    F                                 Reason code            
         DSECT ,                                                        
         IXGQZBUF ,                        The macro for IXGQUERY data  
         IXGANSAA ,                        The answer area mapping      
         IXGCON ,                          Return/reason codes