10. MODIFICATION › 10.2 Program Modification and Extension › 10.2.2 Protocols and Functions
10.2.2 Protocols and Functions
This section describes the protocols and functions of the
input, select, and output routines of the VM Data Transfer
Program.
INPUT ROUTINE PROTOCOL AND FUNCTION
Input routines are called with the following data:
R13 = save area address
R14 = return address
R15 = entry point address
R10 = VMTCMPCB address
The following data is returned:
R15 = return code:
0 - input successful
4 - end-of-file
8 - error
R1 = data address (R15=0)
R10 = VMTCMPCB
updated fields on initial call:
CMPOLRL, CMPORFM, CMPBUFL
updated field on any successful read:
CMPDATA (same as R1)
On the initial call, the input routine opens the input data
source and completes the VMTCMPCB macro.
At end-of-file, the input routine closes the input data
source, and signals this event to the calling program.
SELECT ROUTINE PROTOCOL AND FUNCTION
Select routines are called with the following data:
R13 = save area address
R14 = return address
R15 = entry point address
R10 = VMTCMPCB address
R0 = 0 - standard call
1 - termination call (data may be passed on this
call)
R1 = data address
The following data is returned:
R15 = return code: 0 - record is selected
4 - record is excluded
8 - error
On the initial call, the select routine reads and processes
any override parameters, if applicable. The default DDname
for these parameters is SELECT.
When the termination call is received, any summary reports
are produced.
OUTPUT ROUTINE PROTOCOL AND FUNCTION
Output routines are called with the following data:
R13 = save area address
R14 = return address
R15 = entry point address
R10 = VMTCMPCB address
R0 = 0 - standard call
1 - termination call (data may be passed on this
call)
R1 = data address
The following data is returned:
R15 = return code:
0 - output successful
4 - error
On the initial call, the output routine opens the output data
medium, using information supplied in the VMTCMPCB macro.
When the output routine is called, register one contains the
data address. When the data address is zero, there is no
data to be written. When register one is not equal to the
address in CMPDATA, the record comes from VMTCMP.
On the termination call, any data addressed by register one
is output, and the output file is closed.