Macro for CP cmd confirmation?
search cancel

Macro for CP cmd confirmation?

book

Article ID: 108993

calendar_today

Updated On:

Products

VM:Operator

Issue/Introduction


Is there a way to turn on, or a sample vmoper macro that would prompt the operator to confirm he really wants to issue a command, like FORCE for example ?
I have created a simple macro that checks authorization which requires a userid to put added in the vmoper config for that macro but I was really trying to make the operator just confirm or cancel a FORCE cmd.
Similar to zOS WTO like below.
An operator enters a cmd then he has to reply to accept it (continue) or A to abort.

Is there a way to do something similar with VM:Operator?

 14:01:35 1177 SSMSHUT: MVS system (PROD) shutdown requested at 14:02.
   Reply immediately 'A' to abort or 'U' to accept.

14:01:41 R 1177,U

Environment

Release:
Component: VMY

Resolution

The HOLDMSG function is a good solution and puts up a REPLY prompt for the running MACRO. 

Additional Information

You may want to clean this up to better meet your needs. 

<<< snip >>> 
FORCE VMOPER A1 F 80 Trunc=80 Size=30 Line=19 Col=1 Alt=0 

===== * * * Top of File * * * 
===== /* Police the FORCE command, ask for CONFIRMATION */ 
===== address VMOPER 
===== 
===== /* Grab the UserID he's trying to FORCE */ 
===== parse arg forceID . 
===== 
===== If forceID = '' Then 
===== Do 
===== Call PUTMSG 'No UserID specified for FORCE command.' 
===== Exit 28 
===== End 
===== 
===== /* Ask the Issuer if he really wants to FORCE the USER */ 
===== Call PUTMSG 'Please confirm you want to FORCE' , 
===== forceID 'from the system?' 
===== msg = 'Enter "YES" to proccess the CP FORCE command.' 
===== a = HOLDMSG(msg) 
===== pull response 
===== 
===== If response <> 'YES' Then 
===== Do 
===== Call PUTMSG 'CP FORCE command ABORTED.' 
===== Exit 4 
===== End 
===== 
===== /* OK ... we'll issue the CP FORCE command! */ 
===== 
===== 'TEST CP FORCE' forceID 
===== 
===== Exit 
===== * * * End of File * * * 
<<< snip >>> 


Here’s what you see: 


<<< snip >>> 
force 
No UserID specified for FORCE command. 
VMYINI0005I 0.000 Error( 28); 
force aaaaaaa 
Please confirm you want to FORCE aaaaaa from the system? 
Enter "YES" to proccess the CP FORCE command. 
VMYEXE0018R Reply 1 to read issued by FORCE. 
reply 1 yes 
VMYRPL1193I Reply 1 YES has been accepted. 
HCPUSO045E AAAAAAA not logged on 
VMYINI0006I 0.000 Ready; 
<<< snip >>>