Use the MIHQUERY macro to retrieve the current MIH time interval setting for a device.
The requirements for the caller are:
Environmental factor | Requirement |
---|---|
Minimum authorization: | Supervisor state and PSW key 0-7 |
Dispatchable unit mode: | Task or SRB |
Cross memory mode: | PASN=HASN=SASN |
AMODE: | 31-bit |
ASC mode: | Primary or access register |
Interrupt status: | Enabled or disabled for I/O and external interrupts |
Locks: | The caller may hold locks, but is not required to hold any. |
Control parameters: | Must reside in the primary address space |
Before issuing the MIHQUERY macro, you must pin the UCB you specify in the macro. The UCB identifies the device. Pinning the UCB ensures that a reconfiguration request does not delete or reuse the UCB between the time you determine the UCB address and the time the MIHQUERY service uses the address.
For more information about pinning, see z/OS MVS Programming: Authorized Assembler Services Guide.
None.
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.
To ensure that the system can detect missing interrupts, do not issue this macro more than once per second. Issuing the macro more than once per second might also interfere with DISPLAY, SET IOS, and SETIOS commands.
The standard form of the MIHQUERY macro is written as follows:
Syntax | Description |
---|---|
name | name: Symbol. Begin name in column 1. |
␢ | One or more blanks must precede MIHQUERY |
MIHQUERY | |
␢ | One or more blanks must follow MIHQUERY |
UCBPTR=ucb addr | ucb addr: RS-type address, or address in register (2) - (12). |
,TIMEINT=time interval | time interval: RS-type address, or address in register (2) - (12). |
,RETCODE=return code | return code: RS-type address, or address in register (2) - (12). |
,RSNCODE=reason code | reason code: RS-type address, or address in register (2) - (12). |
The parameters are explained as follows:
Any errors related to state, key, and addressing requirements cause an abend X'2C6'. See z/OS MVS System Codes for complete information about this abend and its associated reason codes. To help debug the problem, provide a recovery routine that records and/or dumps the needed data, including the address and contents of the parameter list.
When the MIHQUERY macro returns control to your program, GPR 15 contains a hexadecimal return code and GPR 0 contains a hexadecimal reason code.
Return Code | Reason Code | Meaning and Action |
---|---|---|
00 | None | Meaning: MIHQUERY processing completed
successfully. Action: None. |
04 | None | Meaning: The MIH interval for this device
is zero. The system does not monitor missing interrupts for the device. Action: None. |
08 | 01 | Meaning: Environmental error. NIP processing
is still in progress. Action: Retry. |
0C | None | Meaning: System error. This return code
is for IBM diagnostic purposes only. Action: Supply the
following information to the appropriate IBM support personnel:
|
***********************************************************************
** USE THE LIST AND EXECUTE FORM OF THE MIHQUERY SERVICE. OBTAIN **
** AN ADDRESS OF A UCB FROM THE DASD CLASS AND PASS THAT ADDRESS TO **
** THE MIHQUERY SERVICE. **
** **
** ASSUMPTIONS: **
** ENTRY STATE: SUPERVISOR **
** ENTRY KEY : 7 **
** ENTRY MODE : PRIMARY **
** **
** REGISTER USAGE: **
** **
** BASEREG: 9 **
** DYNAMIC AREA: 6 (SUBPOOL 2) **
** **
***********************************************************************
IOTMW111 CSECT ,
IOTMW111 AMODE 31
IOTMW111 RMODE ANY
***********************************************************************
** ENTRY LINKAGE **
***********************************************************************
BAKR 14,0
LR 9,15
USING IOTMW111,9
***********************************************************************
** OBTAIN STORAGE FOR THE SERVICE PARAMETER LISTS AND WORKAREAS. **
** ESTABLISH ADDRESSABILITY TO ALL. **
***********************************************************************
L 0,SIZDATD GETS THE DYNAMIC AREA SIZE INTO
* REGISTER ZERO FOR GETMAIN
GETMAIN RU,LV=(0),SP=2 GETS THE DYNAMIC AREA FROM SUBPOOL 2
LR 6,1 GETS ADDRESS OF DYNAMIC AREA FROM
* THE RETURNED ADDRESS OF THE GETMAIN
USING MYDYNMIC,6 GETS ADDRESSABILITY TO THE DYNAMIC
* AREA.
***********************************************************************
** SCANS FOR THE FIRST DEVICE IN THE DASD DEVICE CLASS. **
** NOTE THAT THERE IS NO NEED TO PIN A COPY OF THE UCB FOR THE SCAN **
** BUT A PIN IS REQUIRED FOR THE MIHQUERY SO IT IS DONE IN THE SCAN **
** TO SAVE A SERVICE CALL. **
***********************************************************************
UCBSCAN ADDRESS,WORKAREA=UCBWORK,UCBPTR=MYUCBPTR, X
PIN,TEXT=MYPINTXT,PTOKEN=MYPTOKEN, X
DYNAMIC=YES,RANGE=ALL,DEVCLASS=DASD,LINKAGE=SYSTEM, X
MF=(E,UCBAREA,COMPLETE) GETS THE FIRST DASD DEVICE
***********************************************************************
********* RETURN AND REASON CODES SHOULD BE CHECKED HERE ************
***********************************************************************
***********************************************************************
** OBTAIN THE MIH TIME INTERVAL **
***********************************************************************
MIHQUERY UCBPTR=MYUCBPTR,TIMEINT=TIMEINTERVAL, X
MF=(E,MIHAREA,COMPLETE) QUERIES THE MIH INTERVAL FOR
* THE DASD DEVICE.
***********************************************************************
********* DO SOMETHING WITH THE RETURNED VALUE. *******************
***********************************************************************
***********************************************************************
** UNPINS THE UCB. **
***********************************************************************
UCBPIN UNPIN,PTOKEN=MYPTOKEN,LINKAGE=SYSTEM, X
MF=(E,PINAREA,COMPLETE)
***********************************************************************
** RETURNS TO THE CALLER. **
***********************************************************************
PR RETURN TO CALLER
MYPINTXT DC CL58'THIS SHOULD BE MEANINGFUL INFORMATION'
LTORG
MYDYNMIC DSECT MY DYNAMIC AREA
***********************************************************************
* **
* MIHQUERY LIST FORM **
* **
***********************************************************************
MIHQUERY MF=(L,MIHAREA)
***********************************************************************
* **
* UCBSCAN LIST FORM **
* **
***********************************************************************
UCBSCAN MF=(L,UCBAREA)
UCBWORK DS CL100 100 BYTE WORK AREA FOR UCBSCAN.
***********************************************************************
* **
* UCBPIN LIST FORM **
* **
***********************************************************************
UCBPIN MF=(L,PINAREA)
MYPTOKEN DS CL8 PIN TOKEN RETURNED BY THE UCBSCAN
* SERVICE.
TIMEINTERVAL DS CL4 MIH TIME INTERVAL RETURNED BY THE
* MIHQUERY SERVICE.
MYUCBPTR DS CL4 CONTAINS THE ADDRESS OF THE UCB
* RETURNED BY THE SCAN SERVICE AND
* FOR WHICH THE MIHQUERY IS DONE.
ENDDATD DS 0D GETS ON AN 8 BYTE BOUNDARY FOR
* GETMAIN
DYNSIZE EQU (ENDDATD-MYDYNMIC) TOTAL SIZE OF THE DYNAMIC AREA
IOTMW111 CSECT ,
DS 0F
SIZDATD DS 0A SETS THE SIZE IN THE MODULE
DC AL1(0)
DC AL3(DYNSIZE)
END IOTMW111