Scenario 2: Request for Private Resource
Sequence of Steps in Private Resource Request Processing shows the sequence of steps that occur when an APPC/VM assembler user program in CMS requests a private resource from an APPC/VM assembler private resource manager program.
In this scenario, the private resource is on a different system,
but within the same TSAF collection. Assume the requester virtual
machine has a user ID of REQ1
and the server virtual machine
has a user ID of SERV1
.
The functions performed in this scenario include:
- Setting up the two communicating virtual machines
- Starting APPC/VM communications
- Connecting to another virtual machine
- Sending and receiving messages
- Replying to and waiting for messages
- Severing the connection to another virtual machine
- Ending APPC/VM communications.
This scenario is to give you a better idea of how APPC/VM programs work together. Note that the macro functions can be more detailed than what is shown in this scenario.
Sequence of Steps in Private Resource Request Processing
User Program Private Resource Manager Program Program
(Requester Virtual Machine) (Server Virtual Machine)
----------------------------- -------------------------------- -------
Enable communications directory file Set up $SERVER$ NAMES file
1 HNDIUCV SET,NAME=USRNAME,EXIT=X1
2 APPCVM CONNECT,PRMLIST=PLADDR,
RESID=RESNAME,WAIT=NO,
BUFLEN=0,MF=L
3 CMSIUCV CONNECT,NAME=USRNAME,
PRMLIST=PLADDR,EXIT=X1,
COMDIR=YES,ERROR=ERR1
4 CMS invokes program
5 HNDIUCV SET,NAME=RESNAME,
EXIT=X2
. 6 exit X2 receives control
and posts ECB
program waits for interrupt 7 IUCV ACCEPT,
PRMLIST=PLADDR,
PATHID=path2,MF=L
. 8 CMSIUCV ACCEPT,
NAME=RESNAME,
. PRMLIST=PLADDR,EXIT=X2
9 HNDIUCV HLD,NAME=RESNAME
.
10 gets connect complete interrupt .
11 exit X1 gets control and posts ECB program waits for interrupt
12 APPCVM SENDDATA PRMLIST=PLADDR, .
PATHID=path1,BUFFER=dataddr, .
RECEIVE=NO .
13 gets message pending
interrupt
14 exit X2 receives control
and posts ECB
15 APPCVM RECEIVE
PRMLIST=PLADDR,
PATHID=path2
BUFFER=bufaddr,
BUFLEN=length
16 X1 gets control for FCI
. .
. .
17 sending and receiving continue
. .
. .
18 APPCVM SEVER,PRMLIST=PLADDR,
TYPE=NORMAL,PATH=path1,MF=L
19 CMSIUCV SEVER,NAME=USRNAME,
PRMLIST=PLADDR, CODE=ONE
20 X1 gets control for FCI
21 sever interrupt
22 exit X2 receives control
23 APPCVM SEVER,
PRMLIST=PLADDR,
PATHID=path2,MF=L
24 CMSIUCV SEVER,
NAME=RESNAME,
PRMLIST=PLADDR
25 X2 gets control for FCI
26 HNDIUCV RES,
NAME=RESNAME,
PRMLIST=PLADDR
27 HNDIUCV CLR,NAME=USERNAME 27 HNDIUCV CLR,NAME=RESNAME
. .
. .
. .
28 X1 address of exit routine X2 address of exit
routine
29 ERR1 address of error routine ERR2 address of error
routine
30 USRNAME DC CL8'RED' RESNAME DC CL8'BLUE'
31 RESNAME DC CL8'TARGET'
32 PLADDR DS XL40 PLADDR DS XL40
Use the HELP Facility for complete details on all APPC/VM functions,
or use the following publications:
- For details on the APPCVM and IUCV macro functions, see the z/VM: CP Programming Services.
- For complete details on all CMSIUCV and HNDIUCV macro functions, see the z/VM: CMS Macros and Functions Reference.