This macro returns information about EMCS consoles in the system.
The requirements for the caller are:
Environmental factor | Requirement |
---|---|
Minimum authorization: | Supervisor state. System PSW key |
Dispatchable unit mode: | Task |
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. |
The calling program may include mapping macro IEEZB887 which can be used to map the information that is returned in the buffer addressed by BUFPTR.
The calling program may also optionally include macro IEEZB888, which contains the declarations for the reason and return codes used by IEEQEMCS.
None.
Before issuing the IEEQEMCS 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.
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.
If REQUEST=FULL is specified, the service must read the data space of each console being reported on. Depending on the number of consoles, this can degrade performance of the service.
The IEEQEMCS macro is written as follows:
Syntax | Description |
---|---|
name | name: symbol. Begin name in column 1. |
␢ | One or more blanks must precede IEEQEMCS. |
IEEQEMCS | |
␢ | One or more blanks must follow IEEQEMCS. |
REQUEST=COUNT | Default: REQUEST=COUNT |
REQUEST=SUMMARY | |
,BUFPTR=bufptr | bufptr: RS-type address or address in register (2) - (12). |
,BUFSIZE=bufsize | bufsize: RS-type address or address in register (2) - (12). |
,TOKEN=token | token: RS-type address or address in register (2) - (12). |
,RECSIZE=recsize | recsize: RS-type address or address in register (2) - (12). |
REQUEST=INFO | |
,BUFPTR=bufptr | bufptr: RS-type address or address in register (2) - (12). |
,BUFSIZE=bufsize | bufsize: RS-type address or address in register (2) - (12). |
,TOKEN=token | token: RS-type address or address in register (2) - (12). |
,RECSIZE=recsize | recsize: RS-type address or address in register (2) - (12). |
REQUEST=FULL | |
,BUFPTR=bufptr | bufptr: RS-type address or address in register (2) - (12). |
,BUFSIZE=bufsize | bufsize: RS-type address or address in register (2) - (12). |
,TOKEN=token | token: RS-type address or address in register (2) - (12). |
,RECSIZE=recsize | recsize: RS-type address or address in register (2) - (12). |
,STATUS=ACTIVE | Default: STATUS=ACTIVE |
,STATUS=INACTIVE | |
,STATUS=ALL | |
,STATUS=BACKLOG | |
,STATUS=ERR | |
,BKLG_NUM=bklg_num | bklg_num: RS-type address or address in register (2) - (12). |
Default: BKLG_NUM=10 | |
,CN=cn | cn: RS-type address or address in register (2) - (12). |
,SYS=sys | sys: RS-type address or address in register (2) - (12). |
,KEY=key | key: RS-type address or address in register (2) - (12). |
,AUTH=ANY | Default: AUTH=ANY |
,AUTH=MASTER | |
,AUTH=SYS | |
,AUTH=IO | |
,AUTH=CONS | |
,AUTH=ALL | |
,AUTH=INFO | |
,AUTH=SYSONLY | |
,AUTH=IOONLY | |
,AUTH=CONSONLY | |
,AUTH=ALLONLY | |
,AUTH=INFOONLY | |
,ATTR=ANY | Default: ATTR=ANY |
,ATTR=YES | |
,ATTR=ROUT | |
,ATTR=HC | |
,ATTR=AUTO | |
,ATTR=AUTON | |
,ATTR=MN | |
,ATTR=INTIDS | |
,ATTR=UNKNIDS | |
,ATTR=NONE | |
,DOM=ANY | Default: DOM=ANY |
,DOM=YES | |
,DOM=NORMAL | |
,DOM=ALL | |
,DOM=NONE | |
,CONSCNT=conscnt | conscnt: 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=1 | |
,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) | |
The parameters are explained as follows:
To code: Specify the RS-type address, or address in register (2)-(12), of a pointer field.
To code: Specify the RS-type address, or address in register (2)-(12), of a fullword field.
To code: Specify the RS-type address, or address in register (2)-(12), of a pointer field.
To code: Specify the RS-type address, or address in register (2)-(12), of a pointer field.
To code: Specify the RS-type address, or address in register (2)-(12), of a fullword field.
To code: Specify the RS-type address, or address in register (2)-(12), of an 8-character field.
To code: Specify the RS-type address, or address in register (2)-(12), of an 8-character field.
To code: Specify the RS-type address, or address in register (2)-(12), of an 8-character field.
To code: Specify the RS-type address, or address in register (2)-(12), of a pointer field.
To code: Specify the RS-type address of a fullword field, or register (2)-(12).
To code: Specify the RS-type address of a fullword field, or register (2)-(12).
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 are assembled with the same level of the system. In this way, MAX ensures that the parameter list does not overwrite nearby storage.
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.
None.
The following table identifies the hexadecimal return and reason codes and the equate symbol associated with each reason code.
Return Code | Reason Code | Equate Symbol |
---|---|---|
0 | — | Equate Symbol: IEEQE_RC_OK Meaning: EMCS consoles have been found. In the case of a REQUEST type of SUMMARY, INFO, or FULL, the output buffer was large enough sufficient to hold all of the information for the consoles meeting the search criteria. Action: None required. |
4 | — | Equate Symbol: IEEQE_RC_NOCONS Meaning: No EMCS consoles meet the specified filters. Action: None required. |
8 | — | Equate Symbol: IEEQE_RC_NOSTOR Meaning: Insufficient return buffer storage to complete the query operation. Action: Refer to the action provided with the specific reason code. |
8 | 4 | Equate Symbol: IEEQE_RS_TOKSZCONS Meaning: A token and recommended buffer size have been returned in TOKEN and RECSIZE. Also, some console information has been returned in the output buffer. Action: Process the information returned in the console buffer, then issue IEEQEMCS again with the token that was returned by this call to IEEQEMCS to obtain more console information. |
8 | 8 | Equate Symbol: IEEQE_RS_TOKSZNOCONS Meaning: A token and recommended buffer size have been returned in TOKEN and RECSIZE. The output buffer is too small to return any EMCS console information. Action: Allocate a new buffer that is at least the size returned in RECSIZE, and issue IEEQEMCS again with the new buffer and the token returned on the previous IEEQEMCS call. The recommended buffer size returned in RECSIZE is sufficient to hold only one console. It may be necessary to obtain a buffer larger than that to hold all of the consoles returned by IEEQEMCS. |
8 | 12 | Equate Symbol: IEEQE_RS_NOTOKSZRET Meaning: TOKEN and RECSIZE parameters were not coded on the macro invocation, so IEEQEMCS could not return a recommended buffer size to the caller. The buffer size specified by BUFSIZE was not sufficient to hold all of the consoles returned by IEEQEMCS. Action: Issue IEEQEMCS again with the TOKEN and RECSIZE parameters. |
12 | — | Equate Symbol: IEEQE_RC_INVTOK Meaning: Invalid token in parameter list. Action: Issue IEEQEMCS again with a correct token or a token of zeros. |
16 | — | Equate Symbol: IEEQE_RC_INVPL Meaning: Invalid parameter list. Action: Refer to the action provided with the specific reason code. |
16 | 4 | Equate Symbol: IEEQE_RS_INVACRN Meaning: The eyecatcher (ECDM) in the parameter list was invalid. Action: Correct the eyecatcher (ECDM) in the parameter list and issue IEEQEMCS again. |
16 | 8 | Equate Symbol: IEEQE_RS_INVADDR Meaning: An output address is invalid. An ABEND occurred while trying to access storage at an address specified in the parameter list, possibly because that storage is not accessible by the caller, or the storage does not exist. Action: Correct the address in the parameter list and issue IEEQEMCS again. |
16 | 12 | Equate Symbol: IEEQE_RS_INVBUFSIZEADDR Meaning: The BUFSIZE parameter was invalid. Action: Correct the BUFSIZE parameter and issue IEEQEMCS again. |
16 | 16 | Equate Symbol: IEEQE_RS_INVLGTH Meaning: The length of the parameter list is invalid. Action: Correct the length in the parameter list and issue IEEQEMCS again. |
16 | 20 | Equate Symbol: IEEQE_RS_INVVERS Meaning: The version specified in PLISTVER is invalid. Action: Correct the version and issue IEEQEMCS again. |
16 | 24 | Equate Symbol: IEEQE_RS_INVFUNC Meaning: The REQUEST type specified in the parameter list is not a valid REQUEST type. Action: Correct the REQUEST type in the parameter list and issue IEEQEMCS again. |
16 | 28 | Equate Symbol: IEEQE_RS_INVSTAT Meaning: The STATUS type specified in the parameter list is not a valid STATUS type. Action: Correct the STATUS type in the parameter list and issue IEEQEMCS again. |
16 | 32 | Equate Symbol: IEEQE_RS_INVAUTH Meaning: The command authority specified in the parameter list is not a valid command authority type. Action: Correct the AUTH value in the parameter list and issue IEEQEMCS again. |
16 | 36 | Equate Symbol: IEEQE_RS_INVDOM Meaning: The DOM attribute specified in the parameter list is not a valid DOM attribute type. Action: Correct the DOM attribute in the parameter list and issue IEEQEMCS again. |
16 | 40 | Equate Symbol: IEEQE_RS_INCONSIST Meaning: A set of parameters specified in the parameter list conflict with each other. Action: Correct the parameter list to avoid conflicting parameters and issue IEEQEMCS again. |
16 | 44 | Equate Symbol: IEEQE_RS_INVATTR Meaning: The routing attributes specified in the parameter list are not valid routing attribute types. Action: Correct the ATTR field in the parameter list and issue IEEQEMCS again. |
64 | — | Equate Symbol: IEEQE_RC_SYSERR Meaning: System Error. This return code is for IBM diagnostic purposes only. Action: Record the return and reason codes and supply them to the appropriate IBM support personnel. |
64 | 04 | Equate Symbol: IEEQE_RS_SYSABEND Meaning: An ABEND occurred during processing. This reason code is for IBM diagnostic purposes only. Action: Record the return and reason codes and supply them to the appropriate IBM support personnel. |
64 | 08 | Equate Symbol: IEEQE_RS_SYSERR Meaning: An error occurred during processing. This reason code is for IBM diagnostic purposes only. Action: Record the return and reason codes and supply it to the appropriate IBM support personnel. |
Example
.
.
* Initialize BUFSIZE and TOKEN
L REG9,INITSIZE
ST REG9,BUFSIZE
MVC TOKEN,INITTOKEN
Set up addresses for IEEQEMCS
LA REG9,TOKEN
ST REG9,TOKENPTR
LA REG9,RECSZ
ST REG9,RECSZPTR
* Get storage for output buffer
STORAGE OBTAIN,LENGTH=BUFSIZE,ADDR=BUFPTR,COND=NO,LOC=ANY
* Issue IEEQEMCS
DOQEMCS EQU *
IEEQEMCS REQUEST=FULL, Full info X
STATUS=ALL, Active or inactive consoles X
TOKEN=TOKENPTR, Token X
BUFPTR=BUFPTR, Buffer address X
BUFSIZE=BUFSIZE, Buffer size X
RECSIZE=RECSZPTR, Recommended size X
RETCODE=RETCODE, Return code X
RSNCODE=RSNCODE, Reason code X
MF=(E,PLIST,COMPLETE)
* Check return and reason codes from IEEQEMCS
LA REG14,IEEQE_RC_OK Check if all consoles have been
C REG14,RETCODE returned
BE ALLOK All consoles have been returned,
so process them
LA REG14,IEEQE_RC_NOCONS Check if no consoles have been
C REG14,RETCODE returned
BE DONE No consoles met the filter, so X
exit
LA REG14,IEEQE_RC_NOSTOR Check if the storage buffer could
C REG14,RETCODE not hold all the consoles
BNE ERROR No, there was some kind of error
LA REG14,IEEQE_RS_TOKSZCONS
C REG14,RSNCODE
BE SOMEOK The buffer was too small to hold X
all the consoles meeting this X
filter, but IEEQEMCS put as many X
consoles as possible in the X
buffer. Process the consoles, X
and call IEEQEMCS again.
LA REG14,IEEQE_RS_TOKSZNOCONS
C REG14,RSNCODE
BE GETMORE The buffer was too small for X
even one console. Free the X
buffer, get more storage, and X
call IEEQEMCS again.
.
.
.
ALLOK EQU *
* Call PROCCONS to process the output buffer.
LA REG15,PROCCONS
BALR REG14,REG15
* There are no more consoles to process, so exit
XR REG15,REG15 Zero return code
B DONE
SOMEOK EQU *
* Call PROCCONS to process the consoles returned in
* the output buffer.
LA REG15,PROCCONS
BALR REG14,REG15
* There is more console information to be retrieved, so
* loop back to DOQEMCS.
B DOQEMCS
PROCCONS EQU *
* Process consoles, and return to caller.
ST REG14,RETADDR
L HDRREG,BUFPTR Load pointer to buffer in R2
USING ECDM_HDR,HDRREG This should be the ECDM header X
pointer
L SUMMREG,ECDM_HDR_SIZE Load the size of the header
AR SUMMREG,HDRREG Find the address of the summary X
block
LH REG15,ECDM_NENT Load number of entries
ST REG15,NUMCONS
USING ECDM_SUMM,SUMMREG
USING ECDM_INFO,INFOREG
USING ECDM_DSP,DSPREG
USING ECDM_CNSW,CNSWREG
USING ECDM_MSCP,MSCPREG
CONSLOOP LTR REG15,REG15 Is the number of entries zero?
BZ CONSDONE Yes, exit loop
L REG8,ECDM_SUMM_SIZE Put size of summ block in R10
L ENDREG,ECDM_SUMM_CONS_SIZE Put size of all blocks for X
this console in R11
AR REG8,SUMMREG Get address of end of the X
summary block in R8 (work reg)
AR ENDREG,SUMMREG Get address of the end of the X
console block in R11
BLKLOOP LR REG9,REG8 Copy work addr into R9
SR REG9,ENDREG Are we at the end of the block?
BZ DOCONS Yes, do the actual console X
processing
LA REG9,ECDM_TYPE_INFO Load the type of block in R9
CH REG9,0(REG8) Is this an info block?
BE INFOBLK Yes, branch to info block
LA REG9,ECDM_TYPE_DSP Load the type of block in R9
CH REG9,0(REG8) Is this a DSP block?
BE DSPBLK Yes, branch to data space block
LA REG9,ECDM_TYPE_MSCP Load the type of block in R9
CH REG9,0(REG8) Is this an MSCOPE block?
BE MSCPBLK Yes, branch to MSCOPE block
B ERROR There was a bad type, so exit
INFOBLK LR INFOREG,REG8 Load INFO block addr into R4
A REG8,ECDM_INFO_SIZE Increment size of block
B BLKLOOP Find next block
DSPBLK LR DSPREG,REG8 Load DSP block addr into R5
A REG8,ECDM_DSP_SIZE Increment size of block
B BLKLOOP Find next block
MSCPBLK LR MSCPREG,REG8 Load MSCP block addr into R6
A REG8,ECDM_MSCP_SIZE Increment size of block
B BLKLOOP Find next block
DOCONS EQU * Console processing
* At this point, do any processing on this individual
* console that is necessary.
.
.
.
* Now, decrement the console count, and process the
* next console in the buffer (if there is one).
L REG15,NUMCONS
BCTR REG15,0 Decrement console count
ST REG15,NUMCONS
LR SUMMREG,REG8 Get address of next block in R3
B CONSLOOP process next block
CONSDONE L REG14,RETADDR
BR REG14
.
.
.
GETMORE EQU *
* There was not enough storage to complete the request, so
* get some more.
* First delete the old storage
STORAGE RELEASE,LENGTH=BUFSIZE,ADDR=BUFPTR
* Now, since IEEQEMCS returned a recommended storage
* size, move that amount into BUFSIZE, and obtain the
* storage buffer.
MVC BUFSIZE,RECSZ
STORAGE OBTAIN,LENGTH=BUFSIZE,ADDR=BUFPTR,COND=NO,LOC=ANY
* Loop to issue IEEQEMCS again
B DOQEMCS
.
.
.
ERROR EQU *
* Do any error handling here
.
.
.
DONE EQU *
* IEEQEMCS found no more consoles, so release the output
* buffer.
STORAGE RELEASE,LENGTH=BUFSIZE,ADDR=BUFPTR
* Now, continue on with other processing, etc.
.
.
.
* Declare constants and variables
BUFSIZE DS F
BUFPTR DS F
TOKENPTR DS F
RECSZPTR DS F
TOKEN DS CL8
RECSZ DS F
RETCODE DS F
RSNCODE DS F
NUMCONS DS F
RETADDR DS F
INITSIZE DC XL4'300'
INITTOKEN DC XL8'0'
* IEEQEMCS parameter list
DS 0F
IEEQEMCS MF=(L,PLIST)
* IEEQEMCS return code equates
IEEZB888
* Include mapping of ECDM blocks
IEEZB887
END