We want to execute a CP command on the OPERATOR console.
What's the best way to accomplish that?
z/VM 6.4 environment
Here is what we did to set up a VM:Schedule request to send a message to VMOPER via the VMSCHED VMDMSG EXEC to issue a QUERY CHPID command.
Create exec to issue the command you want to issue and make accessible to user running VM:Operator.
Create a VM:Operator SYSTEM LOGTABLE entry to capture the message and run the above EXEC.
Load the changed logtable.
Create a VMSCHED EXEC request to run VMDMSG VMOPER ABCXYZ123I.
1. Created a DCHPID EXEC - placed on VMOPER 191 (or on any disk accessed by VMOPER)
'CP Q CHPID 25'
2. Created the following in the VM:Operator SYSTEM LOGTABLE.
We did this through the VMOPER ADMIN EDIT SYSTEM LOGTABLE command:
* Run DCHPID EXEC when we get ABCXYZ123I from VMSCHED
EXEC DCHPID MSG VMSCHED *1 * +20.60 ='ABCXYZ123I'
EXEC DCHPID - is the action to be taken when VM:Operator gets this message
MSG - a keyword to indicate the message being defined
VMSCHED - the userid that this message is being received from
*1 - The message class. Since VMDMSG sends the message via MSGNOH, the message will come through as a class *1
* - indicates we are using the SCAN oriented method for text matching
+20.60 - means start the scan in column 20 for 60 bytes to find the string
='ABCXYZ123I' - is the string to scan ... the = indicates a string and the string is in quotes. Use double quotes to indicate to match on upper or lower case. the actual string being matched is ABCXYZ123I
3 Load the new logtable: VMOPER TABLE LOAD LOG SYSTEM (you have to do this in order for VM:Operator to process the newly added statement)
4. Created the following EXEC request in VM:Schedule to run the request every 5 minutes starting at 14:15
vmsched exec qchipid vmdmsg vmoper ABCXYZ123I run the exec (at 12:05 every 00:05:00
Where: qchipid is the request name
vmdmsg vmoper ABCXYZ123I run the exec - is the exec to run and the parms
at 12:05 every 00:05:00 - start running at 12:05 and run every 5 minutes
The response from VMSCHED when you schedule the request:
VMDSCH0050I Request 'QCHIPID' FIRST run scheduled: THU 05/16/19 AT 12:05:00.
5. Here is what we see on the VM:Operator system window when the time comes:
12:26:59 From VMSCHED : VMSCHED MSG FROM VMANAGER : ABCXYZ123I
12:26:59 No devices on path 25
and from the REVIEW screen:
12:26:59 VMSCHED *1 VMSCHED MSG FROM VMANAGER : ABCXYZ123I
12:26:59 VMOPER *3 No devices on path 25
See the VM:Operator documentation (Administrator's) for information on Message Routing and Filtering and under Subcommands for the ADMIN and TABLE commands.
See the VM:Operator Administrating guide for more information on Message Routing and Filtering and under Subcommands for the ADMIN and TABLE commands.
Here's the link to the doc: