IBM OS/390 Time Clock User Manual


 
PROGA START PROGB CSECT PROGC CSECT
BALR (VSE) (VSE)
USING . .
...
. ST 13,SAVEB+4 ST 13,SAVEC+4
...
Application Application Application
Program Program Program
Logic Logic Logic
...
LA 13,SAVEA LA 13,SAVEB .
CALL PROGB CALL PROGC .
EOJ(Return) Return(PROGA) Return(PROGB)
SAVEA DC 18F′0′ SAVEB DC 18F′0′ SAVEC DC 18F′0′
END END END
Figure 27. VSE Subroutine Linkage
These registers have additional meaning under MVS:
If any unused registers are available, one of these should be substituted as a
base register or,
The save area may be placed in front of the program code that is to be
based on register 13. Register 13 is then both pointing to a save area and
acting as the base register.
Save Areas
Under both operating systems, all programs must provide a save area before
calling another program. By convention, this save area should be 18 fullwords
and contain the general purpose registers, as well as save area chaining
pointers. The called program performs the storing of registers into the calling
programs save area. The first program to receive control from MVS is
responsible for saving the registers in the system-provided save area (address
passed in register 13).
In MVS, the called program should provide a save area regardless of whether it
calls additional subroutines. MVS Data Management functions, in certain
instances, store the calling routines registers into a save area whose address is
Register 1 The PARM field of the EXEC statement provides an external facility for
providing information to the program at job step execution time.
When control is passed to your program, register 1 contains the
address of a fullword on a fullword boundary. This fullword is the
starting address of a 102 byte area on a halfword boundary where 100
bytes of information can be entered in the PARM field. This is one
approach you can use to replace the VSE user communication region
routines; for example, setting the UPSI byte externally.
Register 15 Before returning to the calling program, you can load register 15 with
a return code. You can analyze this code by MVS job control
statements of a subsequent step to determine if the step is to be
executed or bypassed. You can substitute return code processing for
VSE logic which tests indicators set in the communication region by a
previous step of the job.
Register 13 Must point to a save area if any I/O or calls to subordinate programs
are performed. If, in the VSE version of the program, register 13 is
used as a base register, consider one of the following alternatives:
270 VSE to OS/390 Migration Workbook