I EXEC Action RoutiIU!S Writing Action Routines 10 Action routines may also be written as EXECslo. The programmable operator
parameters are available in a different fashion for EXEC action routines. The
method is described below.
1. Having determined that the action routine is an EXEC, the programmable
operator facility calls the action routine accordingly.
2. The following information is passed as parameters (arguments) on the
EXEC invocatio.l1, in this order:
Requester's userid
Requester's nodeid
Logical operator's userid
Logical operator's nodeid
Message type code
The programmable operator facility's userid The programmable operator facility's nodeid
Networking machine userid
RT ABLE filename
3. The following parameters are stacked LIFO for the EXEC in this order:
RTABLE PARAMETER field contents Message text
In order to facilitate handling by an EXEC, if the requester is CP, the request­
er's userid and nodeid are "CP". How an action routine is written using Basic Assembler Language depends on
the function(s) that the action routine performs and the conditions under which
it runs. Since the programmable operator can use message content and mes­
sage origin to determine which action routine to call, it may not be necessary
for the action routine to check any further conditions. However, by using the PARMLIST supplied by the programmable operator facility, the action routine
may obtain additional information about the message. Each entry in the P ARMLIST points to some item of data about the message just received or
about the programmable operator environment.
As described in the preceding section, "Action Routine Parameter Interface," the information initially provided to the action routine is in the form of a CMS EXECs may be written using the System Product Interpreter, EXEC 2, or CMS EXEC languages.
The Programmable Operator Facility 455
tokenized PLIST. By loading the second fullword of the second token of that
PLIST into a register, the user can establish addressability to the PROP PARMLIST. For example, SAVE (14,12)
LR R12,R15 USING ROUTINEX,R12 L R2 , 1 2 ( , R 1 ) USING PARMLIST,R2 SAVE REGISTERS LOAD BASE REGISTER ESTABLISH ADDRESSABILITY LOAD PROP ADDRESS PARM ADDRESSABILITY These instructions would be sufficient for many action routines to establish
addressability for the action routine and the PROP PARMLIST. The following
instructions could then be used to obtain the addresses of the requester's (mes­
sage originator's) userid and nodeid.
L
L R4,PARMRUSR R6,PARMRNOD GET REQUESTER'S USERID ADDRESS GET REQUESTER'S NODEID ADDRESS The PROP DSECTs, such as PARMLIST, define the above labels. To include
the PROP DSECT in the action routine insert the following assembler instruc­
tion in the source file for the routine: COPY PROP In addition, it may be desirable to include the CMS REGEQU macro instruc­
tion for register equates. When the action routine is complete, it is necessary to
restore registers and branch to the address in register 14, or use the OS RETURN macro.
Handling Console I/O in an Action Routine
456 VM/SP System Programmer's Guide
The installation must determine how an action routine is to handle console 1/0 generated by the virtual machine and CPo Normal operation of the program­
mable operator facility sets VMCONIO to IUCV (by default) before calling an
action routine and sends the VMCONIO to the message originator (requester).
If it is desired that console I/O (VMCONIO) produced by the action routine
be typed on the programmable operator virtual machine console, the action
routine must SET VMCONIO OFF. However, because there would not
normally be an operator at the programmable operator virtual machine console,
an installation can code an action routine to receive and handle VMCONIO instead of allowing the programmable operator to receive it and send it to the
requester (message originator). To accomplish this, the action routine can
receive the VMCONIO that was generated by using the IUCV RECEIVE
function with message type 5 specified as the IUCV target class (TRGCLS).
For details on using IUCV, refer to the section on IUCV earlier in this manual.
An example of this may be found in the subroutine CALLARTN of the
IBM-supplied module DMSPOP. In order to use IUCV it is necessary to
include the CP COpy files IPARML and EQU. CP generated console I/O (CPCONIO) should be handled differently than
above. The CPCONIO setting should not be changed because this could cause
the programmable operator facility to miss some asynchronous CP messages.
If the action routine is to receive the responses from CP commands that it
issues, it should use the CP Diagnose X'08' support with a command response
buffer, rather than attempting to receive it with IUCV. (See "Diagnose Code
Previous Page Next Page