Purpose: The OPERCMD command can be used to invoke an operator console command. OPERCMD is not normally used from the DIF command interface but can be useful when processing parameter members during product initialization and shutdown. OPERCMD can also be used by the command scripts in the MON-Explorer PC Application.
Capturing Command Output: Command output can be captured using two methods:
-
Subsystem Console - If
OPERCMD(BUFFER(len))is specified in the DIF startup parameters, the Extended CSA storage is used to buffer the command output using a subsystem console. The buffer request also causes DIF to obtain a subsystem console from the operating system.Subsystem consoles are defined in the
CONSOLnnmember in the system parameter library - typicallySYS1.PARMLIB. AD C,Nconsole command can be used to display your current console configuration. If aD C,Ncommand is performed after DIF allocates to a subsystem console, aDTS-nnnnis displayed next to the console allocated to DIF.
-
Extended MCS (EMCS) Console (Recommended Method for z/OS systems) - If
OPERCMD(BUFFER(len))has NOT been specified in the DIF startup parameters, on a z/OS system the DIF OPERCMD interface uses the EMCS console interface to capture command output.The EMCS console interface has several advantages over using subsystem consoles:
- No setup or console definitions are required on either the Host system or the Explorer.
- The EMCS console interface is multi-threaded.
- The console honors the Security environment established for the Explorer user.
If the operating system supports Extended MCS Consoles (EMCS) or the
OPERCMD(BUFFER(len))
DIF parameter was used to set up a subsystem console,
DIF attempts to capture the output of the command. The output capture
process is terminated by either the last WTO being marked as the last of the command, or the
wait time is exceeded. The WAIT parameter defaults to 5 seconds.
WAIT(0) is specified,
DIF will not capture the output of the command, and
DIF will not wait for command completion. The CN parameter can be used if you want to issue the command from a
specific console.
WAIT and/or CN keyword
parameters are specified, they must be positioned before the requested operator command and
parameters. Syntax:
OPERCMD [WAIT(sec)] [CN(id)] {command} {parameters}
Comments: This command is typically used by SCC Monitor (MON) and
Easy-Exit (EXT) product initialization and termination routines:
prdINIT and
prdTERM. You might also find the command useful in
command lists executed by the DIF EXEC command.
Examples: If you want to automatically activate SCC Monitor tasks
during DIF START MON processing, you can create two new members in the
DIF parameter library: MONINIT and
MONTERM. The MONINIT member might contain the following
statement to activate a started task called MONSTC. The
MONSTC member should be placed in a system procedure library.
OPERCMD START MONSTC
Multiple monitor tasks can be activated simultaneously to monitor different pools, or at
different interval times. For example, another monitor task named MONSTC1
could be started by adding an OPERCMD START MONSTC1 statement in the
MONINIT member. The MONTERM member should contain
corresponding STOP statements for the tasks that were started in
MONINIT, for example:
OPERCMD STOP MONSTC