IBM OS/390 User Manual

Page of 673
The preceding combination of VSE macro instructions allows you to execute a
routine when an operator attention interrupt occurs and to return to the program
that was being executed before the interruption.
MVS has no equivalent function. It is possible, however, to simulate this function
by using the WTOR macro. This MVS macro writes a message requiring a reply
on the operator console and provides the information required by the control
program to relay the reply to the issuing program. You must wait for the reply.
This macro could also be executed without a following WAIT macro and coding
inserted in the program loop to test the completion of the event. Upon
completion, it is possible to execute the communication routine and later resume
normal processing. Another solution is to include the communication routine as
a subtask with the WTOR macro instruction followed by a WAIT instruction.
Alternately, you can use the Job Control PARM Field (see Register 1 in “Register
Conventions” on page 269) to pass information to the program. You may realize
throughput improvements because there is no wait for operator
s reply.
Under VSE, you can initiate communication with the background partition using
the interrupt key on the console. You can use the MSG (message) command to
initiate communication with a foreground partition.
Under MVS, the operator interfaces with job management to provide
operator-to-system communication via commands entered on the operator
console. This allows the operator to respond to requests from processing
programs. However, operator-to-processing program communication must be
initiated internally by the processing program. There is no support of the
external interrupt key for operator-to-program communication; it switches from
the primary to the alternate console.
13.2.4 Virtual Storage Macros
13.2.4.1 GETVIS and FREEVIS Macros
The MVS GETMAIN, FREEMAIN and STORAGE macros have functions similar to
the VSE GETVIS and FREEVIS macros. Example:
(VSE)
GETVIS LENGTH=1000,ADDRESS=PTR1
LTR
R15,R15
GETVIS OK?
BNZ
ERROR1
NO, CANCEL
. . . .
FREEVIS LENGTH=1000,ADDRESS=PTR1
. . . .
PTR1
DS
A
(MVS)
GETMAIN RC,LV=1000
LTR
R15,R15
GETVIS OK?
BNZ
ERROR1
NO, ABEND
ST
R1,PTR1
save storage address
. . . .
L
R1,PTR1
pick up storage address
FREEMAIN RC,LV=1000,ADDRESS=(1)
. . . .
PTR1
DS
A
Chapter 13. A s s e m b l e r
289