Description

MGCRE allows a program to issue commands without operator intervention. For example, an application could issue a VARY or CONTROL command by using MGCRE, which might satisfy an outstanding action message.

The authority of the issuer to issue the command is validated based on the information provided on the macro invocation. Priority is given to the UTOKEN or ENVRIN data structures, either the data provided on the macro invocation, or lacking that, the security data associated with the issuer.

If OPERCMDS is not active, or a decision cannot be made based on the established definitions, then the authority is determined based on the authority of the console as provided on the AUTHCMDX keyword, or lacking that, the required CONSID or CONSNAME keywords.

Note: You can still use the MGCR macro to issue internal START or REPLY commands. However, IBM recommends using MGCRE.

See z/OS MVS Programming: Authorized Assembler Services Guide for more information about using the MGCRE macro. See MVS Commands Installation Exit in z/OS MVS Installation Exits for more information about the MVS commands installation exit. The MVS commands installation exit and subsystems can review submitted commands.

MGCRE has a list and an execute form, but no standard form.

Environment

The requirements for the caller are:

Environmental factor Requirement
Minimum authorization: Supervisor state and PSW key 0-7
Dispatchable unit mode: Task
Cross memory mode: PASN=HASN=SASN
AMODE: Any
ASC mode: Primary
Interrupt status: Enabled for I/O and external interrupts
Locks: No locks held
Control parameters: Must be in the primary address space

Programming requirements

None.

Restrictions

Input register information

Before issuing the MGCRE 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-1
Used as work registers by the system. If register 15 contains a return code of 0, register 0 contains the ASID of the started address space.
2-13
Unchanged
14
Used as a work register by the system
15
Used as a work register by the system, unless a START, MOUNT, or LOGON command was suppressed by the SSI or an MVS commands installation exit. In that case, register 15 contains a return code.

Performance implications

None.