IEECMDS — Query/remove attached commands

Description

This macro provides the same function as the CMDS operator command. It can be used to obtain information about MVS™ commands which are attached or waiting to be attached in the *MASTER* or CONSOLE address spaces.

It can also be used to remove commands which are waiting. It cannot be used to cancel commands which are already executing.

Environment

The requirements for the caller are:

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

Programming requirements

The calling program may include mapping macro IEEZB889 which can be used to map the information which is returned in the buffer specified as BUFFER.

Restrictions

The caller cannot be protected by an FRR.

Input register information

Before issuing the IEECMDS 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 general purpose registers (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 access registers (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

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 IEECMDS macro is written as follows:

Syntax Description
   
   name name: Symbol. Begin name in column 1.
   
One or more blanks must precede IEECMDS.
   
IEECMDS  
   
One or more blanks must follow IEECMDS.
   
 REQUEST=COUNT Default: REQUEST=COUNT
 ,REQUEST=INFO  
 ,REQUEST=REMOVE  
   
  ,BUFFER=buffer Required with REQUEST=INFO or REQUEST=REMOVE
  buffer: RS-type address or address in register (2) - (12).
   
  ,BUFSIZE=bufsize Required with REQUEST=INFO or REQUEST=REMOVE
  bufsize: RS-type address or address in register (2) - (12).
   
 ,CLASS=class class: RS-type address or address in register (2) - (12).
 ,CLASS=ANY_CLASS Default: CLASS=ANY_CLASS
   
 ,CMD=cmd cmd: RS-type address or address in register (2) - (12)
 ,CMD=ANY_CMD Default:CMD=ANY_CMD
   
 ,ID =id id: RS-type address or address in register (2) - (12)
 ,ID=ANY_ID Default:: ID=ANY_ID
   
 ,JOB=job job: RS-type address or address in register (2) - (12)
 ,JOB=ANY_JOB Default:: CMD=ANY_JOB
   
,COUNT=count count: 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=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 addrNOCHECK)  
 ,MF=(M,list addr)  
 ,MF=(M,list addr,COMPLETE)  
 ,MF=(M,list addrNOCHECK)  
   

Parameters

The parameters are explained as follows:

name
An optional symbol, starting in column 1, that is the name on the IEECMDS macro invocation. The name must conform to the rules for an ordinary assembler language symbol.
,REQUEST=COUNT
,REQUEST=INFO
,REQUEST=REMOVE
An optional parameter that indicates the type of request. The default is REQUEST=COUNT.
  • REQUEST=COUNT
    • Return only the count of commands which meet the search criteria.
    • This count is returned for all values of REQUEST, but if REQUEST=COUNT, no other information is returned.
  • REQUEST=INFO
    • Return information about commands meeting the search criteria.
    • The count of matching commands is returned.
    • The following information is returned for each command:
      • command names
      • id numbers
      • "waiting or executing" status
      • jobname and asid of the command issuer
      • date/time of issue/execution
  • REQUEST=REMOVE
  • Remove commands from the "waiting for execution" status, if they meet the search criteria.
  • The count of matching commands is returned.
  • The following information is returned for each removed command:
    • command names
    • id numbers
    • "waiting or executing" status
    • jobname and asid of the command issuer
    • date/time of issue/execution

Message IEE065I is issued for each removed command. It is directed to the console that issued the removed command.

,BUFFER=buffer
A required input parameter if REQUEST=INFO or REQUEST=REMOVE is specified to contain the response.

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

,BUFSIZE=bufsize
A required input parameter if REQUEST=INFO or REQUEST=REMOVE is specified to contain the size of the output storage buffer.

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

CLASS=class
CLASS=ANY_CLASS
An optional input parameter that indicates the class of commands to be processed.
The currently defined classes are:
  • Class M1 — commands which are attached to *MASTER*, and may be essential to clearing a backlog of Class M2 commands.
  • Class M2 — ordinary attached commands which run in the *MASTER* address space.
  • Class M3 — only for SEND commands which run in the *MASTER* address space.
  • Class C1 — commands which are attached in CONSOLE, and may be essential to clearing a backlog of Class C2 commands.
  • Class C2 — ordinary attached commands which run in the CONSOLE address space.
  • Class C3 — only for ROUTE commands which run in the CONSOLE address space.

The default is ANY_CLASS.

For detailed information about command classes, see the description of command flooding in z/OS MVS System Commands.

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

CMD=cmd
CMD=ANY_CMD
An optional input parameter that indicates the name of command to be processed.

The command name must be specified as the full name, not an abbreviation. This is to conform with the command name returned during the previous execution of the macro with REQUEST=INFO. The default is ANY_CMD.

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

ID=id
ID=ANY_ID
An optional input parameter that indicates the id number of the command that had been returned on a previous CMDS INFO command. The default is ANY_ID.

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

JOB=job
JOB=ANY_JOB
An optional input parameter that indicates the jobname of the job which issued the commands. The default is ANY_CMD.

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

COUNT=count
An required input parameter that contains the address area that will contain the number of commands meeting the specified criteria.

To code:Specify the RS-type address or address in register (2)-(12) of an pointer 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=1
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, 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 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 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
  • A decimal value of 1
,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)
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.

,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.
IBM recommends that you use the modify and execute forms of IEECMDS in the following order:
  1. Use IEECMDS...MF=(M,list-addr,COMPLETE) specifying appropriate parameters, including all required ones.
  2. Use IEECMDS...MF=(M,list-addr,NOCHECK) specifying the parameters that you want to change.
  3. Use IEECMDS...MF=(E,list-addr,NOCHECK) to execute the macro.

ABEND codes

None.

Return codes

Macro IEECMDS provides equate symbols for the return and reason codes.

When the IEECMDS macro returns control to your program:
  • GPR 15 (and retcode, when you code RETCODE) contains a return code.
  • When the value in GPR 15 is not zero, GPR 0 (and rsncode, when you code RSNCODE) contains a reason code.

The following table identifies the hexadecimal return and reason codes:

Hexadecimal Return Code Hexadecimal Reason Code Equate Symbol Meaning and Action
00 Equate Symbol: CMDS_RC_OK

Meaning: Matching commands have been found. In the case of a REQUEST type of INFO or REMOVE, the output buffer was sufficient to hold all of the information for the commands meeting the search criteria.

Action: None

04 Equate Symbol: CMDS_RC_NOCMDS

Meaning: No commands meet the specified filters.

Action: None

08 Equate Symbol: CMDS_RC_NOSTOR

Meaning: Insufficient return buffer storage to complete the query operation.

Action: Refer to the action provided with the specific reason code.

08 04 Equate Symbol: CMDS_RS_SOMECMDS

Meaning: The output buffer is too small to contain all requested information, but does contain the information for one or more commands.

If REQUEST=REMOVE, the system has removed only the commands for which information is returned.

Action: The count of matching commands has been returned. Adjust the buffer size so that it is at least as large as the count multiplied by the output size for each entry, plus the length of the header, and issue the macro again.

The constant CMDS_HEADER_LENGTH represents the amount of storage required for the buffer header.

The constant CMDS_ENTRY_LENGTH represents the amount of storage required per command.

These constants are declared in mapping macro IEEZB889.

08 08 Equate Symbol: CMDS_RS_NOCMDS

Meaning: The output buffer is too small to contain the information for even one command.

If REQUEST=REMOVE, the system has not removed any commands.

Action: The count of matching commands has been returned. Adjust the buffer size so that it is at least as large as the count multiplied by the output size for each entry, plus the length of the header, and issue the macro again.

The constant CMDS_HEADER_LENGTH represents the amount of storage required for the buffer header.

The constant CMDS_ENTRY_LENGTH represents the amount of storage required per command.

These constants are declared in mapping macro IEEZB889.

10 Equate Symbol: CMDS_RC_INVPL

Meaning: Invalid parameter list.

Action: Refer to the action provided with the specific reason code

10 04 Equate Symbol: CMDS_RS_INVACRN

Meaning: The acronym in the parameter list was invalid.

Action: Correct the acronym in the parameter list and issue IEECMDS again.

10 08 Equate Symbol: CMDS_RS_INVADDR

Meaning: An output message 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 invalid address in the parameter list and issue IEECMDS again.

10 0C Equate Symbol: CMDS_RS_INVBUFFER

Meaning: The address or length of the buffer in the parameter list was invalid.

Action: Correct the values of BUFFER or BUFSIZE or both in the parameter list and issue IEECMDS again.

10 10 Equate Symbol: CMDS_RS_INVLGTH

Meaning: The length of the parameter list is invalid.

Action: Correct the length in the parameter list and issue IEECMDS again.

10 14 Equate Symbol: CMDS_RS_INVVERS

Meaning: The version specified in the parameter list is invalid.

Action: Correct the version in the parameter list and issue IEECMDS again.

10 18 Equate Symbol: CMDS_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 IEECMDS again.

10 1C Equate Symbol: CMDS_RS_INVCLASS

Meaning: The CLASS specified in the parameter list is not a valid CLASS name.

Action: Correct the CLASS in the parameter list and issue IEECMDS again.

10 20 Equate Symbol: CMDS_RS_INVID

Meaning: The ID specified in the parameter list is not a valid value. The ID value must be a decimal number in EBCDIC printable) characters.

Action: Correct the ID in the parameter list and issue IEECMDS again.

40 Equate Symbol: CMDS_RS_SYSERR

Meaning: System Error. This return code is for IBM diagnostic purposes only.

Action: Record the return and reason codes and supply it to the appropriate IBM support personnel.

40 04 Equate Symbol: CMDS_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 it to the appropriate IBM support personnel.

40 08 Equate Symbol: CMDS_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.